无法从 14.10 升级到 15.04

无法从 14.10 升级到 15.04

我无法从 14.10 升级到 15.04。构建软件通道时出现此错误:

W:Failed to fetch http://mirror.sov.uk.goscomb.net/ubuntu/dists/vivid/restricted/source/Sources
Bad header line [IP: 77.75.110.242 80]

答案1

测试一下:

打开终端,

Ctrl++AltT

运行:

sudo -i
rm -rf /etc/apt/sources.list.d/*.list
nano /etc/apt/sources.list

在打开的文件中。

删除内容。

粘贴以下内容:

deb http://us.archive.ubuntu.com/ubuntu/ vivid main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ vivid main restricted
deb http://us.archive.ubuntu.com/ubuntu/ vivid-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ vivid universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ vivid universe
deb http://us.archive.ubuntu.com/ubuntu/ vivid-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ vivid multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ vivid multiverse
deb http://us.archive.ubuntu.com/ubuntu/ vivid-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu vivid-security main restricted
# deb-src http://security.ubuntu.com/ubuntu vivid-security main restricted
deb http://security.ubuntu.com/ubuntu vivid-security universe
# deb-src http://security.ubuntu.com/ubuntu vivid-security universe
deb http://security.ubuntu.com/ubuntu vivid-security multiverse
# deb-src http://security.ubuntu.com/ubuntu vivid-security multiverse
deb http://archive.canonical.com/ubuntu vivid partner
# deb-src http://archive.canonical.com/ubuntu vivid partner
deb http://extras.ubuntu.com/ubuntu vivid main
# deb-src http://extras.ubuntu.com/ubuntu vivid main
# deb http://us.archive.ubuntu.com/ubuntu/ vivid-proposed universe multiverse restricted main

Ctrl+ O,保存文件。Ctrl+ X,关闭 nano。

继续运行:

apt-get autoremove
apt-get clean
UNUSCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
apt-get remove --purge $UNUSCONF
NEWKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
ADDKERNEL="linux-(image|headers|ubuntu-modules|restricted-modules)"
METAKERNEL="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
UNUSKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $ADDKERNEL |grep -vE $METAKERNEL|grep -v $NEWKERNEL)
apt-get remove --purge $UNUSKERNELS
apt-get update
apt-get dist-upgrade
dpkg --configure -a
apt-get -f install
apt-get clean
reboot

相关内容