新装linux系统如果要装软件需要执行apt-get install命令,结果找不到软件包。首先需要先执行apt-get update命令,然后发现apt-get update命令也执行失败超时。
更新成国内源后速度快了,结果还是会卡在某个地方,一直执行不下去。真的是崩溃了。
按照下面两个步骤执行后,解决了安装软件问题。
解决国外源更新慢问题
mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" >/etc/apt/sources.list
echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list
echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib" >>/etc/apt/sources.list
echo "deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list
apt-get update 一直 0% working 失败解决方案
解决:
cd /usr/lib/apt/methods
ln -s http https