我do-release-upgrade
在一台 Ubuntu 18.04.6 (LTS) 机器上运行。
它抛出了一些与 Python 包相关的错误,我慌了,屏幕关闭了。
现在我只剩下这个:
root@h2838745:~# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
gcc-8-base manpages-de php-fpm php-mbstring php-zip
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
我可以安装/升级一些较小的保留下来的,但它们却apt install <package>
apt upgrade <package>
无法做到这一点。
但当我尝试时,apt install gcc-8-base
我得到:
root@h2838745:~# apt install gcc-8-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
geoip-database git-man hicolor-icon-theme java-common libasound2-data libatk1.0-data libavahi-common-data libdrm-common libgdk-pixbuf2.0-common libgtk2.0-common libpthread-stubs0-dev
libthai-data libx11-data libx11-doc libx11-xcb1 powermgmt-base x11-common x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
acl adduser adwaita-icon-theme apt apt-transport-https apt-utils at-spi2-core autopoint base-files base-passwd bash binutils binutils-x86-64-linux-gnu bsdmainutils bsdutils
busybox-initramfs bzip2 ca-certificates ca-certificates-java cifs-utils composer console-common console-data console-setup console-setup-linux coreutils cpio cracklib-runtime cron curl
dash db-util db5.3-util dbus debconf debconf-i18n debconf-utils debianutils dialog diffutils dirmngr dmsetup dpkg dpkg-dev dselect e2fsprogs ed elasticsearch expat fakeroot fdisk
fetchmail file findutils finger fontconfig fontconfig-config ftp gawk gettext gettext-base gifsicle git gnupg gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv
grep groff-base gtk-update-icon-cache guile-2.0-libs gzip hostname htop humanity-icon-theme ifupdown info init-system-helpers initramfs-tools initramfs-tools-bin initramfs-tools-core
install-info iproute2 iptables iputils-arping iputils-ping iputils-tracepath isc-dhcp-client isc-dhcp-common jpegoptim jsonlint kbd keyboard-configuration kmod language-pack-de
language-pack-de-base ldap-utils less libacl1 libaio1 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapparmor1 libapt-inst2.0 libapt-pkg5.0 libargon2-0
libasn1-8-heimdal libasound2 libasprintf0v5 libassuan0 libasyncns0 libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0 libatspi2.0-0 libattr1 libaudit1
libavahi-client3 libavahi-common3 libbinutils libblkid1 libbsd0 libbz2-1.0 libc-bin libc6 libcairo2 libcap-ng0 libcap2 libcap2-bin libcgi-fast-perl libcgi-pm-perl libcom-err2 libcomerr2
libcrack2 libcroco3 libcryptsetup12 libcups2 libcurl3-gnutls libcurl4 libdatrie1 libdb5.3 libdbus-1-3 libdebconfclient0 libdevmapper1.02.1 libdns-export1100 libdpkg-perl libdrm-amdgpu1
libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1 libencode-locale-perl liberror-perl libestr0 libevent-core-2.1-6 libexpat1 libext2fs2 libfakeroot libfastjson4
libfcgi-perl libfdisk1 libffi6 libfile-fcntllock-perl libfl2 libflac8 libfontconfig1 libfontenc1 libfreetype6 libfribidi0 libgail-common libgail18 libgc1c2 libgcc1 libgcrypt20 libgd3
libgdbm-compat4 libgdbm5 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgeoip1 libgif7 libgl1 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglvnd0 libglx-mesa0 libglx0
libgmp10 libgnutls30 libgomp1 libgpg-error0 libgpm2 libgraphite2-3 libgsasl7 libgssapi-krb5-2 libgssapi3-heimdal libgtk2.0-0 libgtk2.0-bin libharfbuzz0b libhcrypto4-heimdal
libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libhx509-5-heimdal libice-dev
libice6 libicu60 libidn11 libidn2-0 libio-html-perl libip4tc0 libip6tc0 libiptc0 libisc-export169 libjbig0 libjemalloc1 libjpeg-turbo8 libjpeg8 libjson-c3 libk5crypto3 libkeyutils1
libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 libkyotocabinet16v5 liblcms2-2 libldap-2.4-2 libllvm10 liblocale-gettext-perl libltdl7 liblwp-mediatypes-perl liblz4-1
liblzma5 liblzo2-2 libmagic1 libmnl0 libmount1 libmpdec2 libmpfr6 libmysqlclient20 libncurses5 libncursesw5 libnetfilter-conntrack3 libnettle6 libnfnetlink0 libnghttp2-14
libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnih-dbus1 libnih1 libnl-3-200 libnl-genl-3-200 libnpth0
libnspr4 libnss3 libntlm0 libnuma1 libodbc1 libogg0 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper1
libpcap0.8 libpci3 libpciaccess0 libpcre3 libpcsclite1 libperl5.26 libpipeline1 libpixman-1-0 libpng16-16 libpopt0 libprocps6 libpsl5 libpulse0 libpython3-stdlib libpython3.6
libpython3.6-minimal libpython3.6-stdlib libpython3.7-minimal libreadline7 libroken18-heimdal librsvg2-2 librsvg2-common librtmp1 libsasl2-2 libsasl2-modules-db libseccomp2 libselinux1
libsemanage1 libsensors4 libsepol1 libsigsegv2 libslang2 libsm-dev libsm6 libsmartcols1 libsndfile1 libsnmp30 libsodium23 libsqlite3-0 libss2 libssl1.0.0 libssl1.1 libstdc++6 libsystemd0
libtalloc2 libtasn1-6 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libthai0 libtiff5 libtimedate-perl libtinfo5 libtirpc1 libudev1 libunistring2 liburi-perl
libustr-1.0-1 libutempter0 libuuid1 libvorbis0a libvorbisenc2 libwbclient0 libwebp6 libwind0-heimdal libwrap0 libx11-6 libx11-dev libxau-dev libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0
libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb1 libxcb1-dev libxcomposite1 libxcursor1 libxdamage1 libxdmcp-dev libxdmcp6 libxext6 libxfixes3
libxft2 libxi6 libxinerama1 libxml2 libxmlrpc-epi0 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxslt1.1 libxt-dev libxt6 libxtables12 libxtst6 libxv1 libxxf86dga1
libxxf86vm1 libzip4 libzstd1 linux-base locales login logrotate lsof lynx lzma m4 make makedev man-db memtester mlocate mount mtools multiarch-support mysql-client mysql-client-5.7
mysql-client-core-5.7 mysql-server mysql-server-5.7 mysql-server-core-5.7 ncurses-bin net-tools nginx nginx-common nginx-core odbcinst odbcinst1debian2 openjdk-8-jdk
openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless openssh-client openssh-server openssh-sftp-server openssl optipng passwd patch perl perl-base perl-modules-5.26 php-cli
php-common php-composer-ca-bundle php-composer-semver php-composer-spdx-licenses php-composer-xdebug-handler php-curl php-fpm php-gd php-igbinary php-json-schema php-mbstring php-mysql
php-pear php-psr-container php-psr-log php-redis php-symfony-console php-symfony-filesystem php-symfony-finder php-symfony-process php-symfony-service-contracts php-xml php-xmlrpc
php-zip php7.2-cli php7.2-common php7.2-curl php7.2-fpm php7.2-gd php7.2-json php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-readline php7.2-xml php7.2-xmlrpc php7.2-zip
pinentry-curses pngquant postfix procinfo procmail procps psmisc psutils pwgen python3-minimal python3.6 python3.6-minimal quota readline-common redis-server redis-tools resolvconf
rpcbind rsync rsyslog samba-common sasl2-bin screen sed shared-mime-info sharutils snmp ssl-cert sudo syslinux systemd systemd-sysv sysvinit-utils tar tcpdump tcsh telnet tofrodos
traceroute tzdata ubuntu-mono ucf udev unixodbc unzip util-linux uuid-runtime vim vim-common wget whois wide-dhcpv6-client x11-utils xinetd xxd xz-utils zip zlib1g
The following packages will be upgraded:
gcc-8-base
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt adduser (due to apt) gpgv (due to apt) libapt-pkg5.0 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt) libseccomp2 (due to apt) libstdc++6 (due to apt)
base-files gawk (due to base-files) base-passwd libdebconfclient0 (due to base-passwd) bash libtinfo5 (due to bash) debianutils (due to bash) bsdutils libsystemd0 (due to bsdutils)
coreutils libacl1 (due to coreutils) libattr1 (due to coreutils) libselinux1 (due to coreutils) dash dpkg (due to dash) diffutils libbz2-1.0 (due to dpkg) liblzma5 (due to dpkg)
libzstd1 (due to dpkg) zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs libblkid1 (due to e2fsprogs) libcom-err2 (due to e2fsprogs) libext2fs2 (due to e2fsprogs)
libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk libfdisk1 (due to fdisk) libmount1 (due to fdisk) libncursesw5 (due to fdisk) libsmartcols1 (due to fdisk) findutils grep
libpcre3 (due to grep) install-info (due to grep) gzip hostname init-system-helpers perl-base (due to init-system-helpers) libc-bin login libaudit1 (due to login) libpam0g (due to login)
libpam-runtime (due to login) libpam-modules (due to login) mount util-linux (due to mount) ncurses-bin sed sysvinit-utils libudev1 (due to util-linux)
1 upgraded, 0 newly installed, 537 to remove and 1 not upgraded.
Need to get 18,7 kB of archives.
After this operation, 1.711 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
似乎 gcc-8-base 是新 ubuntu 版本或类似版本的基础 :)
我会再试do-release-upgrade
一次,但命令不再安装,并apt install ubuntu-release-upgrader-core
说
root@h2838745:~# apt install ubuntu-release-upgrader-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ubuntu-release-upgrader-core is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ubuntu-release-upgrader-core' has no installation candidate
root@h2838745:~#
有哪位好心人能给陷入困境的键盘牛仔一些指点吗?:)
答案1
已经解决了。
对于未来的读者:我查看了 /etc/apt/sources.list,其中对 bionic (18) 个源进行了注释(带有德语注释消息“# Bei Aktualisierung zu focal deaktiviert”),并添加了一个新的 focal (20) 源。
我全部评论了并且再次添加了原始来源。
然后apt update
然后apt upgrade
。
然后我又回到了 18 分,并do-release-upgrade
再次尝试。这次没有错误。