新部署的云服务器出现如下错误:
root@iZj6cbjalvhsw0fhndmm5xZ:~# apt-get install gitReading package lists... DoneBuilding dependency tree ??????Reading state information... DoneThe following additional packages will be installed: ?git-man liberror-perlSuggested packages: ?git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svnThe following NEW packages will be installed: ?git git-man liberror-perl0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.Need to get 3,898 kB/3,918 kB of archives.After this operation, 25.6 MB of additional disk space will be used.Do you want to continue? [Y/n] yIgn:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main i386 git-man all 1:2.7.4-0ubuntu1.2Ign:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main amd64 git amd64 1:2.7.4-0ubuntu1.2Ign:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main amd64 git-man all 1:2.7.4-0ubuntu1.2Err:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main amd64 git amd64 1:2.7.4-0ubuntu1.2 ?404 ?Not FoundErr:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main i386 git-man all 1:2.7.4-0ubuntu1.2 ?404 ?Not FoundErr:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main i386 git-man all 1:2.7.4-0ubuntu1.2 ?404 ?Not FoundE: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu/pool/main/g/git/git-man_2.7.4-0ubuntu1.2_all.deb ?404 ?Not FoundE: Failed to fetch http://mirrors.cloud.aliyuncs.com/ubuntu/pool/main/g/git/git_2.7.4-0ubuntu1.2_amd64.deb ?404 ?Not FoundE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
(这不很明显是一些安装源失效,甚至还有命令提示)为了避免像我一样看到错误就百度一波,结果没找到一个靠谱的方法。
超简单,更新一下源就可以了。
sudo apt-get update
阿里云apt-get安装包时Err:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main amd64 git amd64 1:2.7.4-0ubuntu1.2 ??404 ?Not Found
原文地址:https://www.cnblogs.com/lfri/p/10460737.html