上周,我严格按照以下要求将我的 10.04 LTS 升级到了 12.04 LTS:关联(除了使用屏幕工具)并且升级成功。同样,当我尝试将另一个 10.04 LTS 升级到 12.04 LTS 时,我在 apt 更新/获取时收到错误,我无法复制粘贴屏幕上的所有内容,因为我正在直接连接机器而不是通过 ssh 进行升级,但仍然设法截取下面的屏幕截图,这就是它结束的地方:
以下是我的 sources.list 文件
#
# deb cdrom:[Ubuntu-Server 10.04.2 LTS _Lucid Lynx_ - Release i386 (20110211.1)]/ lucid main restricted
# deb cdrom:[Ubuntu-Server 10.04.2 LTS _Lucid Lynx_ - Release i386 (20110211.1)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://archive.ubuntu.com/ubuntu/ lucid main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://archive.ubuntu.com/ubuntu/ lucid universe
deb http://archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ lucid-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu/ lucid-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner
deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe
deb http://security.ubuntu.com/ubuntu lucid-security multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse
有人知道如何解决这个问题吗?谢谢!
更新:1
我尝试将 sources.list 更改为不同的来源,但结果相同。
/var/log/dist-upgrade/main.log
2014-05-05 12:13:34,904 DEBUG Upgrade: apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apparmor apparmor-utils apport apt apt-cacher apt-transport-https apt-utils aptitude avahi-daemon base-files bash bash-completion bind9-host binutils bsdmainutils byobu bzip2 ca-certificates command-not-found command-not-found-data console-setup coreutils cpio cpp cpp-4.4 cpu-checker cron debianutils dhcp3-client dhcp3-common dnsutils dpkg dpkg-dev e2fslibs e2fsprogs elinks-lite file fontconfig-config friendly-recovery fuse-utils g++ g++-4.4 gcc gcc-4.4 gcc-4.4-base gnupg gnupg-curl groff-base grub-common grub-pc icedtea-6-jre-cacao ifupdown info initscripts insserv installation-report iproute iptables iputils-arping iputils-ping kbd language-selector-common libacl1 libapache2-mod-perl2 libapache2-mod-perl2-dev libapache2-mod-php5 libapparmor-perl libapparmor1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapt-inst1.4 libapt-pkg-perl libapt-pkg4.12 libasound2 libatm1 libattr1 libauthen-pam-perl libavahi-client3 libavahi-common3 libberkeleydb-perl libblkid1 libbsd-resource-perl libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcap2 libcomerr2 libcups2 libcurl3 libcurl3-gnutls libcwidget3 libdb4.8 libdbd-mysql-perl libdbi-perl libdbus-1-3 libdbus-glib-1-2 libdrm-intel1 libdrm-radeon1 libdrm2 libedit2 libelf1 libexpat1 libexpat1-dev libflac8 libfontconfig1 libfontconfig1-dev libfreetype6 libfreetype6-dev libfuse2 libgcc1 libgcrypt11 libgd2-xpm libgdbm3 libgif4 libglib2.0-0 libgnutls26 libgomp1 libgpg-error0 libgpm2 libgssapi-krb5-2 libhtml-parser-perl libice-dev libice6 libidn11 libio-interface-perl libio-pty-perl libjpeg62 libjpeg62-dev libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms1 libldap-2.4-2 liblocale-gettext-perl liblockfile1 libltdl7 libmagic1 libncurses5 libncursesw5 libnet-ssleay-perl libnewt0.52 libnih-dbus1 libnih1 libnl1 libnspr4-0d libnss3-1d libogg0 libpam-modules libpam0g libparted0debian1 libpcap0.8 libpci3 libpcre3 libpcsclite1 libplymouth2 libpng12-0 libpng12-dev libpopt0 libpulse0 libreadline6 librpc-xml-perl libsasl2-2 libsasl2-modules libselinux1 libsepol1 libsigc++-2.0-0c2a libslang2 libsm-dev libsm6 libsndfile1 libsqlite3-0 libss2 libssl0.9.8 libstdc++6 libstdc++6-4.4-dev libsub-name-perl libtalloc2 libtasn1-3 libterm-readkey-perl libtext-charwidth-perl libtext-iconv-perl libudev0 libusb-0.1-4 libuuid1 libvorbis0a libvorbisenc2 libwbclient0 libwrap0 libwww-curl-perl libwww-perl libx11-6 libx11-data libx11-dev libxau-dev libxau6 libxcb1 libxcb1-dev libxdmcp-dev libxdmcp6 libxext6 libxfont1 libxi6 libxml-libxml-perl libxml-parser-perl libxml-sax-perl libxml2 libxmuu1 libxpm-dev libxpm4 libxrender1 libxt-dev libxt6 libxtst6 linux-generic-pae linux-headers-generic-pae linux-image-generic-pae locales logrotate lsb-release man-db module-init-tools mount mountall mysql-common mysql-server nano ncurses-bin net-tools ntfs-3g ntpdate odbcinst openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib openssh-client openssh-server openssl os-prober parted passwd pciutils perl perl-base perl-modules php-pear php5 php5-cli php5-common php5-curl php5-gd php5-mysql pkg-config plymouth procps psmisc python python-apport python-apt python-dbus python-gdbm python-gnupginterface python-gobject python-httplib2 python-launchpadlib python-lazr.restfulclient python-lazr.uri python-minimal python-newt python-oauth python-openssl python-pam python-pexpect python-problem-report python-pycurl python-serial python-simplejson python-smartpm python-twisted-bin python-twisted-core python-wadllib python-zope.interface rsync rsyslog samba samba-common samba-common-bin sudo sysvinit-utils tar tcpdump ubuntu-minimal udev ufw unixodbc update-manager-core update-notifier-common upstart ureadahead usbutils util-linux uuid-runtime vim vim-common vim-runtime vim-tiny w3m wget whiptail wireless-crda wireless-tools wpasupplicant x11proto-core-dev xfonts-utils xkb-data xz-utils zlib1g zlib1g-dev
2014-05-05 12:13:34,910 DEBUG apt btrfs snapshots supported: False
2014-05-05 12:13:34,910 DEBUG cache aufs_rw_dir: /tmp/
2014-05-05 12:13:34,911 DEBUG Free space on /: 42229010432
2014-05-05 12:13:34,911 DEBUG Dir /usr mounted on /
2014-05-05 12:13:34,912 DEBUG Dir /var mounted on /
2014-05-05 12:13:34,912 DEBUG Dir /boot mounted on /
2014-05-05 12:13:34,913 DEBUG Dir /var/cache/apt/archives mounted on /
2014-05-05 12:13:34,913 DEBUG Dir /tmp mounted on /
2014-05-05 12:13:34,914 DEBUG Dir /home mounted on /
2014-05-05 12:13:34,914 DEBUG Dir /tmp mounted on /
2014-05-05 12:13:34,914 DEBUG fs_free contains: '{'/var': <DistUpgradeCache.FreeSpace object at 0x91b53ac>, '/tmp': <DistUpgradeCache.FreeSpace object at 0x91b53ac>, '/usr': <DistUpgradeCache.FreeSpace object at 0x91b53ac>, '/boot': <DistUpgradeCache.FreeSpace object at 0x91b53ac>, '/home': <DistUpgradeCache.FreeSpace object at 0x91b53ac>, '/': <DistUpgradeCache.FreeSpace object at 0x91b53ac>, '/var/cache/apt/archives': <DistUpgradeCache.FreeSpace object at 0x91b53ac>}'
2014-05-05 12:13:35,540 DEBUG linux-image-3.2.0-61-generic-pae (new-install) added with 19135549 to boot space
2014-05-05 12:13:36,217 DEBUG dir '/var/cache/apt/archives' needs '76120226' of '<DistUpgradeCache.FreeSpace object at 0x91b53ac>' (42229010432.000000)
2014-05-05 12:13:36,220 DEBUG dir '/usr' needs '317531136' of '<DistUpgradeCache.FreeSpace object at 0x91b53ac>' (42152890206.000000)
2014-05-05 12:13:36,220 DEBUG dir '/usr' needs '52428800' of '<DistUpgradeCache.FreeSpace object at 0x91b53ac>' (41835359070.000000)
2014-05-05 12:13:36,220 DEBUG dir '/boot' needs '19135549' of '<DistUpgradeCache.FreeSpace object at 0x91b53ac>' (41782930270.000000)
2014-05-05 12:13:36,220 DEBUG dir '/tmp' needs '5242880' of '<DistUpgradeCache.FreeSpace object at 0x91b53ac>' (41763794721.000000)
2014-05-05 12:13:36,220 DEBUG dir '/' needs '10485760' of '<DistUpgradeCache.FreeSpace object at 0x91b53ac>' (41758551841.000000)
2014-05-05 12:13:36,221 DEBUG dir '/tmp' needs '0.0' of '<DistUpgradeCache.FreeSpace object at 0x91b53ac>' (41748066081.000000)
2014-05-05 12:13:36,221 DEBUG dir '/usr' needs '0.0' of '<DistUpgradeCache.FreeSpace object at 0x91b53ac>' (41748066081.000000)
2014-05-05 12:13:36,233 DEBUG demoted: 'python-smartpm python-central'
2014-05-05 12:13:36,233 DEBUG found components: {'precise': set(['restricted', 'main', 'multiverse', 'universe']), 'precise-security': set(['restricted', 'main', 'multiverse', 'universe']), 'precise-updates': set(['restricted', 'main', 'multiverse', 'universe'])}
2014-05-05 12:13:42,216 DEBUG abort called
2014-05-05 12:13:42,220 DEBUG openCache()
2014-05-05 12:13:42,220 DEBUG failed to SystemUnLock() (E:Not locked)
2014-05-05 12:13:44,763 DEBUG /openCache(), new cache size 31947
2014-05-05 12:13:44,772 DEBUG enabling apt cron job
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid
答案1
apt-get如果您已将其配置为使用代理,并且代理配置错误,或者代理无法正常工作(例如无法访问互联网),将会报告错误。
/etc/apt/apt.conf
检查您是否在或 中的某个文件中配置了代理/etc/apt/apt.conf.d
。
从终端检查的一种方法是执行apt-config dump|grep -i proxy
。
答案2
使用仅可通过 IPv6 地址访问的代理从 Ubuntu 20.04 升级到 22.04 时遇到此问题。
该问题是一个/usr/lib/python3/dist-packages/UpdateManager/Core/utils.py
拒绝 IPv6http(s)_proxy
设置的错误。
作为一种黑客解决方法,请仔细检查代理是否正确,并注释掉init_proxy
函数中的以下几行:
# basic verification
#for proxy in proxies.values():
# if not re.match("https?://\\w+", proxy):
# print("proxy '%s' looks invalid" % proxy, file=sys.stderr)
# return