我在WSL下面安装了Ubuntu 24.04.1 LTS (GNU/Linux 6.6.87.2-microsoft-standard-WSL2 x86_64)
。 只要一执行apt update
命令,它就给我报错:
bash
Err:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease
Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 101.6.15.130 443]
Err:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease
Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 101.6.15.130 443]
Err:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease
Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 101.6.15.130 443]
搞了好久一直不知道怎么回事,也怎么也解决不了。一开始,因为wsl老是重置我的/etc/resolv.conf
,然后我ping外网也ping不通,那好,我就手动修改了,现在就可以ping得通了。可是,老是出现上面的问题,而且,我感觉它的反应是很慢的,这种感觉就是网络不通的症状。可是......我能够ping得通,也是用的国内源哇?
后来,我找到了这篇文章:APT: Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 10.158.100.1 8080]
然后,按照它里面所写的,我在/etc/apt/apt.conf.d/
下面新增了一个90curtin-aptproxy
配置文件:
bash
Acquire::http::Proxy "http://127.0.0.1:7890";
Acquire::https::Proxy "http://127.0.0.1:7890";
你猜怎么着?畅通了。着实是诡异的问题。
另,从这个版本开始,apt的配置做了很大的改变,开始使用DEB822 格式来配置软件源:
ini
Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
# Types: deb-src
# URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu
# Suites: noble noble-updates noble-backports
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
# Types: deb-src
# URIs: http://security.ubuntu.com/ubuntu/
# Suites: noble-security
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
# 预发布软件源,不建议启用
# Types: deb
# URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu
# Suites: noble-proposed
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
# # Types: deb-src
# # URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu
# # Suites: noble-proposed
# # Components: main restricted universe multiverse
# # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg