1、/etc/apt/sources.list 更换位如下内容
deb http://tw.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
2、sudo apt-get update
3、如果出现 W: There is no public key available for the following key IDs:3B4FE6ACC0B21F32
执行如下命令:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
然后重新执行 : sudo apt-get update
4、执行sudo apt-get upgrade
如果出现 Sub-process /usr/bin/dpkg returned an error code(1)
cd /var/lib/dpkg/ sudo mv info/ info_bak # 现将info文件夹更名 sudo mkdir info # 再新建一个新的info文件夹 sudo apt-get update # 更新 sudo apt-get -f install # 修复 sudo mv info/* info_bak/ # 执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_bak文件夹下 sudo rm -rf info # 把自己新建的info文件夹删掉 sudo mv info_bak info # 把以前的info文件夹重新改回名