![在 ubuntu 上安装 python-pip 时出错](https://linux22.com/image/60829/%E5%9C%A8%20ubuntu%20%E4%B8%8A%E5%AE%89%E8%A3%85%20python-pip%20%E6%97%B6%E5%87%BA%E9%94%99.png)
跑步时
sudo apt-get install python-pip
我收到以下错误消息,导致问题的原因以及如何解决?非常感谢您的帮助。
Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main dpkg-dev all 1.17.5ubuntu5.3
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/main build-essential i386 11.6ubuntu6
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/main libfakeroot i386 1.20-3ubuntu2
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/main fakeroot i386 1.20-3ubuntu2
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/main libalgorithm-diff-perl all 1.19.02-3
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/main libalgorithm-diff-xs-perl i386 0.04-2build4
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/main libalgorithm-merge-perl all 0.08-2
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/universe python-colorama all 0.2.5-0.1ubuntu1
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/universe python-distlib all 0.1.8-1
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/main python-html5lib all 0.999-2
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/main python-urllib3 all 1.7.1-1build1
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ trusty/universe python-pip all 1.5.4-1
Could not resolve 'us.archive.ubuntu.com'
Err http://security.ubuntu.com/ubuntu/ trusty-security/main dpkg-dev all 1.17.5ubuntu5.3
Could not resolve 'security.ubuntu.com'
Err http://security.ubuntu.com/ubuntu/ trusty-security/main python-requests all 2.2.1-1ubuntu0.1
Could not resolve 'security.ubuntu.com'
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.17.5ubuntu5.3_all.deb Could not resolve 'security.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/b/build-essential/build-essential_11.6ubuntu6_i386.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/f/fakeroot/libfakeroot_1.20-3ubuntu2_i386.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/f/fakeroot/fakeroot_1.20-3ubuntu2_i386.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/liba/libalgorithm-diff-perl/libalgorithm-diff-perl_1.19.02-3_all.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/liba/libalgorithm-diff-xs-perl/libalgorithm-diff-xs-perl_0.04-2build4_i386.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/liba/libalgorithm-merge-perl/libalgorithm-merge-perl_0.08-2_all.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/p/python-colorama/python-colorama_0.2.5-0.1ubuntu1_all.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/d/distlib/python-distlib_0.1.8-1_all.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/h/html5lib/python-html5lib_0.999-2_all.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/python-urllib3/python-urllib3_1.7.1-1build1_all.deb Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/r/requests/python-requests_2.2.1-1ubuntu0.1_all.deb Could not resolve 'security.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip_1.5.4-1_all.deb Could not resolve 'us.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
答案1
我自己遇到了这个,在其他地方找到了这个。第一次运行:
sudo apt-get update