ubuntu sudo apt-get update 失败 解决方法

sudo apt-get update
会报一堆错误,显示源有问题

首先备份源列表

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

修改更新源

sudo gedit /etc/apt/sources.list

将下面代码写进去

deb http://mirrors.163.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid-backports main restricted universe multiverse

之后即可成功执行第一条命令

你可能感兴趣的:(ubuntu sudo apt-get update 失败 解决方法)