今天在linux中使用apt-get时,提示连接失败
sudo apt-get update Cannot initiate the connection to archive.ubuntu.com:80
解决办法:修改 /etc/apt/sources.list
1)进入/etc/apt目录
cd /etc/apt
2)备份源文件
mv ./sources.list ./sources.list.backup
3)编辑sources.list
echo deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse >> sources.list
echo deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse >> sources.list
echo deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse >> sources.list
echo deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse >> sources.list
echo deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse >> sources.list
echo deb-src http://mirrors.163.com/ubuntu/ trusty main rest