You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

WSL Ubuntu中无法使用apt安装软件的问题求助

WSL Ubuntu中无法使用apt安装软件的问题求助

大家好,我正在Windows的WSL Ubuntu实例里尝试安装make工具,执行了下面的命令:

sudo apt install make

输入密码回车后,得到了这样的输出:

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

Suggested packages:

make-doc

The following NEW packages will be installed:

make

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 180 kB of archives.

After this operation, 426 kB of additional disk space will be used.

Ign:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 make amd64 4.3-4.1build1

Ign:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 make amd64 4.3-4.1build1

Ign:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 make amd64 4.3-4.1build1

Err:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 make amd64 4.3-4.1build1

Temporary failure resolving 'archive.ubuntu.com'

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/make-dfsg/make_4.3-4.1build1_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我知道本地有一套严格的安全系统,影响证书获取,之前用pip安装Python包时经常需要加--trusted-host这类参数来绕过证书或SSL问题。不确定这和当前的apt问题有没有关系,我试了在apt命令后加--allow-unauthenticated,但没有任何变化。

之后我又执行了sudo apt-get update,结果也报错了,输出如下:

Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease

Ign:2 http://archive.ubuntu.com/ubuntu jammy InRelease

Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease

Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease

Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease

Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease

Ign:2 http://archive.ubuntu.com/ubuntu jammy InRelease

Err:1 http://security.ubuntu.com/ubuntu jammy-security InRelease

Temporary failure resolving 'security.ubuntu.com'

Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease

Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease

Ign:2 http://archive.ubuntu.com/ubuntu jammy InRelease

Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease

Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease

Err:2 http://archive.ubuntu.com/ubuntu jammy InRelease

Temporary failure resolving 'archive.ubuntu.com'

Err:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease

Temporary failure resolving 'archive.ubuntu.com'

Err:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease

Temporary failure resolving 'archive.ubuntu.com'

Reading package lists... Done

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease  Temporary failure resolving 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease  Temporary failure resolving 'archive.ubuntu.com'

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease  Temporary failure resolving 'security.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.

有没有朋友遇到过类似的问题?能帮忙分析下原因和解决办法吗?

备注:内容来源于stack exchange,提问作者user32882

火山引擎 最新活动