无法在 EC2 上安装任何东西?

无法在 EC2 上安装任何东西?

当我尝试在 EC2 上安装任何东西时,它都会给我一堆错误,提示获取失败或无法获取。以下是错误堆栈:

ubuntu@ip-172-31-9-88:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binutils build-essential cpp cpp-4.8 dpkg-dev fakeroot g++ g++-4.8 gcc
  gcc-4.8 libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libasan0 libatomic1 libc-dev-bin libc6-dev
  libcloog-isl4 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-4.8-dev
  libgmp10 libgomp1 libisl10 libitm1 libmpc3 libmpfr4 libquadmath0
  libstdc++-4.8-dev libtsan0 linux-libc-dev make manpages-dev
  python-chardet-whl python-colorama python-colorama-whl python-distlib
  python-distlib-whl python-html5lib python-html5lib-whl python-pip-whl
  python-requests-whl python-setuptools python-setuptools-whl python-six-whl
  python-urllib3-whl python-wheel python3-pkg-resources
Suggested packages:
  binutils-doc cpp-doc gcc-4.8-locales debian-keyring g++-multilib
  g++-4.8-multilib gcc-4.8-doc libstdc++6-4.8-dbg gcc-multilib autoconf
  automake1.9 libtool flex bison gdb gcc-doc gcc-4.8-multilib libgcc1-dbg
  libgomp1-dbg libitm1-dbg libatomic1-dbg libasan0-dbg libtsan0-dbg
  libquadmath0-dbg glibc-doc libstdc++-4.8-doc make-doc python-genshi
  python-lxml python3-setuptools
Recommended packages:
  python-dev-all
The following NEW packages will be installed:
  binutils build-essential cpp cpp-4.8 dpkg-dev fakeroot g++ g++-4.8 gcc
  gcc-4.8 libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libasan0 libatomic1 libc-dev-bin libc6-dev
  libcloog-isl4 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-4.8-dev
  libgmp10 libgomp1 libisl10 libitm1 libmpc3 libmpfr4 libquadmath0
  libstdc++-4.8-dev libtsan0 linux-libc-dev make manpages-dev
  python-chardet-whl python-colorama python-colorama-whl python-distlib
  python-distlib-whl python-html5lib python-html5lib-whl python-pip
  python-pip-whl python-requests-whl python-setuptools python-setuptools-whl
  python-six-whl python-urllib3-whl python-wheel python3-pkg-resources
0 upgraded, 50 newly installed, 0 to remove and 0 not upgraded.
Need to get 979 kB/41.4 MB of archives.
After this operation, 119 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-libc-dev amd64 3.13.0-92.139
  404  Not Found [IP: 54.176.237.167 80]
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe python-pip-whl all 1.5.4-1ubuntu3
  404  Not Found [IP: 54.176.237.167 80]
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/universe python-pip all 1.5.4-1ubuntu3
  404  Not Found [IP: 54.176.237.167 80]
Err http://security.ubuntu.com/ubuntu/ trusty-security/main linux-libc-dev amd64 3.13.0-92.139
  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.13.0-92.139_amd64.deb  404  Not Found [IP: 91.189.88.149 80]

E: Failed to fetch http://us-west-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_1.5.4-1ubuntu3_all.deb  404  Not Found [IP: 54.176.237.167 80]

E: Failed to fetch http://us-west-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip_1.5.4-1ubuntu3_all.deb  404  Not Found [IP: 54.176.237.167 80]

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

答案1

首先尝试运行以下命令以使所有内容保持最新并运行:

sudo apt update
sudo apt -f install
sudo apt dist-upgrade

这些命令将重新初始化包缓存和存储库信息,并将您的系统升级到最新版本,这可能会提供大量的安全更新。

最后,Linux 在您发布的输出中为您提供了以下答案:

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

通常,apt它相当用户友好,并且当出现问题时会向用户提供如上所示的有用提示。

相关内容