首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >获取-安装错误失败

获取-安装错误失败
EN

Ask Ubuntu用户
提问于 2020-05-18 14:48:45
回答 2查看 13.4K关注 0票数 1

我正在尝试进行更新和安装,并不断收到以下错误:

错误:1 http://security.ubuntu.com/ubuntu仿生-安全/宇宙amd64 cpp-8 amd64 8.3.0-6 ubuntu1~18.04.1

我需要做些什么来纠正这些错误?

以下是充分的尝试:

代码语言:javascript
复制
sudo apt install gcc-8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cpp-8 gcc-10-base gcc-9-base libasan5 libgcc-8-dev libgcc-s1 libubsan1
Suggested packages:
  gcc-8-locales gcc-8-multilib gcc-8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan5-dbg liblsan0-dbg libtsan0-dbg libubsan1-dbg
  libmpx2-dbg libquadmath0-dbg
The following NEW packages will be installed:
  cpp-8 gcc-10-base gcc-8 gcc-9-base libasan5 libgcc-8-dev libgcc-s1 libubsan1
0 upgraded, 8 newly installed, 0 to remove and 13 not upgraded.
Need to get 21.0 MB/21.6 MB of archives.
After this operation, 72.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 cpp-8 amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
Err:2 http://security.ubuntu.com/ubuntu bionic-security/main amd64 libgcc-8-dev amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
Err:3 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 gcc-8 amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/g/gcc-8/cpp-8_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-8/libgcc-8-dev_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/g/gcc-8/gcc-8_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing
____________________________________________________________________________________

另外,滚动轮不起作用,但我不知道它是否与这个问题有关。

谢谢

EN

回答 2

Ask Ubuntu用户

发布于 2020-05-18 15:08:33

正如404 not found所说,它意味着存储库信息已经过时。通过在终端上发出以下命令,您可以轻松地解决这个问题:

代码语言:javascript
复制
sudo apt update

现在,重新尝试安装您的软件包,安装过程将是顺利的。

票数 2
EN

Ask Ubuntu用户

发布于 2020-05-19 02:35:58

您需要在安装之前通过执行sudo apt update来更新存储库数据。这就是:

  1. sudo apt update
  2. sudo apt install gcc-8

或者,您只需运行:

代码语言:javascript
复制
sudo apt update && sudo apt install gcc-8

注意:在安装之前总是执行更新是一个很好的做法。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1241009

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档