E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing
解决办法:
apt-get update
或者
apt-get clean
apt-get update
或者
apt-get update --fix-missing
问题解析
1 source本身的问题
根据提示,我们首先应当 apt-get update 一下source,如果在apt-get update后依然报这个error,那就说明这个source本省就有错误,尝试apt-get update --fix-missing后依旧报这个error,果断换source
2 网络的问题
网关错误拦截了数据包或者防火墙故意将其屏蔽在外(比方update 包含有google-chrome浏览器的source时候,ip 会自动重定向至6.6.6.6)
3、更换source
第一种:
sudo vim /etc/resolv.conf
添加nameserver 8.8.8.8
第二种:
/etc/apt/sources.list 的内容换成
sudo apt-get update
2. 添加pip命令
sudo apt-get remove python-pip- cd /usr/local/src
- wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python get-pip.pyhash -r
1.which pip
/usr/local/bin/pip
2.pip
-su: /usr/bin/pip: No such file or directory
3.type pip
pip is hashed (/usr/bin/pip)
So pip is definintely in /usr/local/bin/pip but it is been cached as in /usr/bin/pip, thanks to the Stackoverflow question, the solution is very simple:
4.hash -r
When the cache is clear, pip is working again
浙公网安备 33010602011771号