我最近在我的桌面安装上执行了从 22.10 到 23.04 的“do-release-upgrade”。一切都很顺利,直到这一点:
2023-04-21 08:19:23,651 ERROR got an error from dpkg for pkg: 'linux-headers-6.2.0-20-generic': 'installed linux-headers-6.2.0-20-generic package post-installation script subprocess returned error exit status 1'
2023-04-21 08:19:23,652 DEBUG running apport_pkgfailure() linux-headers-6.2.0-20-generic: installed linux-headers-6.2.0-20-generic package post-installation script subprocess returned error exit status 1
2023-04-21 08:19:29,225 ERROR got an error from dpkg for pkg: 'linux-headers-generic': 'dependency problems - leaving unconfigured'
2023-04-21 08:19:29,225 DEBUG running apport_pkgfailure() linux-headers-generic: dependency problems - leaving unconfigured
2023-04-21 08:19:29,225 DEBUG dpkg error because of dependency problems, not reporting against linux-headers-generic
2023-04-21 08:20:05,416 ERROR got an error from dpkg for pkg: 'linux-generic': 'dependency problems - leaving unconfigured'
2023-04-21 08:20:05,417 DEBUG running apport_pkgfailure() linux-generic: dependency problems - leaving unconfigured
2023-04-21 08:20:05,417 DEBUG dpkg error because of dependency problems, not reporting against linux-generic
2023-04-21 08:23:41,678 ERROR got an error from dpkg for pkg: 'linux-image-6.2.0-20-generic': 'installed linux-image-6.2.0-20-generic package post-installation script subprocess returned error exit status 1'
2023-04-21 08:23:41,678 DEBUG running apport_pkgfailure() linux-image-6.2.0-20-generic: installed linux-image-6.2.0-20-generic package post-installation script subprocess returned error exit status 1
2023-04-21 08:24:06,510 ERROR Exception during pm.DoInstall()
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-nbne_rgq/DistUpgrade/DistUpgradeView.py", line 220, in run
res = pm.do_install(self.writefd)
apt_pkg.Error: E:Sub-process /usr/bin/dpkg returned an error code (1)
2023-04-21 08:24:06,539 ERROR SystemError from cache.commit(): installArchives() failed
2023-04-21 08:24:06,539 ERROR found exception: 'E:Sub-process /usr/bin/dpkg returned an error code (1)'
2023-04-21 08:24:09,768 DEBUG Running PostInstallScript: './xorg_fix_proprietary.py'
2023-04-21 08:24:09,789 DEBUG Running PostInstallScript: '/usr/lib/ubuntu-advantage/upgrade_lts_contract.py'
问题在于 DisplayLink 留下了一些过时的 DKMS 内容。我能够解决这些问题,并获得干净的“apt install -f”,并且系统可以正常运行。
然而,从那时起,当我执行任何“apt”操作时,都会看到一大堆要“自动删除”的软件包列表:
The following packages were automatically installed and are no longer required:
aapt abootimg androguard android-framework-res android-libaapt android-libandroidfw android-libart
android-libbacktrace android-libbase android-libcutils android-liblog android-libnativebridge
android-libnativeloader android-libutils android-libziparchive apksigcopier apksigner apktool
binutils-multiarch bruteforce-luks ca-certificates-mono caca-utils cli-common coreboot-utils
coreboot-utils-doc cramfsswap dctrl-tools default-jdk-headless device-tree-compiler dexdump dh-dkms
diffoscope diffoscope-minimal enjarify fatcat flashrom fontforge-common fontforge-extras fonts-cantarell
fonts-inconsolata fonttools fp-compiler-3.2.2 fp-units-rtl-3.2.2 fp-utils fp-utils-3.2.2 fpc-source-3.2.2
freeglut3 gcc-12-base:i386 giflib-tools gir1.2-mutter-11 gir1.2-nma-1.0 gir1.2-xmlb-2.0 gist gnumeric
gnumeric-common gnumeric-doc hdf5-tools indicator-messages java-wrappers jsbeautifier junit ledit
lib2geom1.1.0 libabsl20210324 libaec0 libantlr-java libantlr3-runtime-java libaopalliance-java
libapache-pom-java libapksig-java libappimage0 libarchive-tools libatinject-jsr330-api-java libavif14
libb2-1 libbpf0 libcdi-api-java libclang-cpp15 libcommons-cli-java libcommons-compress-java
libcommons-io-java libcommons-lang3-java libcommons-parent-java libcommons-text-java libcupsfilters1
libdom4j-java libegl-dev liberror-prone-java libexporter-tiny-perl libflac8 libfontembed1 libfontforge4
libfwupdplugin7 libgeronimo-annotation-1.3-spec-java libgeronimo-interceptor-3.0-spec-java libgit2-1.3
libgl-dev libgl1-mesa-dev libgles-dev libgles1 libglu1-mesa-dev libglut-dev libglut3.12 libglvnd-core-dev
libglvnd-dev libglx-dev libgoffice-0.10-10 libgoffice-0.10-10-common libgs9-common libgssdp-1.2-0
libguava-java libguice-java libgupnp-1.2-1 libhdf5-103-1 libhdf5-hl-100 libicu4j-java libicu71
libiniparser1 libintellij-annotations-java libjansi-java libjavaparser-java libjavascriptcoregtk-5.0-0
libjaxen-java libjcommander-java libjdom1-java libjetbrains-annotations-java libjsr305-java libldap-2.5-0
liblerc3 liblist-moreutils-perl liblist-moreutils-xs-perl libluajit-5.1-2 libluajit-5.1-common
libmaven-archiver-java libmaven-file-management-java libmaven-jar-plugin-java libmaven-parent-java
libmaven-resolver-java libmaven-shared-io-java libmaven-shared-utils-java libmaven3-core-java
libmono-btls-interface4.0-cil libmono-corlib4.5-cil libmono-corlib4.5-dll libmono-i18n-west4.0-cil
libmono-i18n4.0-cil libmono-security4.0-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil
libmono-system-numerics4.0-cil libmono-system-security4.0-cil libmono-system-xml4.0-cil
libmono-system4.0-cil libmonoboehm-2.0-1 libmpdec3 libmutter-11-0 libopengl-dev libperl5.34 libpfm4
libplacebo192 libplexus-archiver-java libplexus-cipher-java libplexus-classworlds-java
libplexus-component-annotations-java libplexus-interpolation-java libplexus-io-java
libplexus-sec-dispatcher-java libplexus-utils2-java libpoppler123 libprocyon-java libprotobuf-lite23
libprotobuf23 libpython3.10 libpython3.10-dev libpython3.10-minimal libpython3.10-stdlib libqpdf28
libqt5opengl5 libqt6core6 libqt6dbus6 libqt6gui6 libqt6network6 libqt6opengl6 libqt6openglwidgets6
libqt6printsupport6 libqt6sql6 libqt6sql6-sqlite libqt6test6 libqt6widgets6 libqt6xml6 libre2-9
libreoffice-ogltrans libreoffice-pdfimport librygel-core-2.6-2 librygel-db-2.6-2 librygel-renderer-2.6-2
librygel-server-2.6-2 libsaxonhe-java libsisu-inject-java libsisu-plexus-java libslf4j-java libsmali-java
libsnappy-java libsnappy-jni libspiro1 libstringtemplate-java libsz2 libtext-trim-perl libtiff5 libtiffxx5
libts0 libubootenv-tool libubootenv0.1 libwagon-provider-api-java libwebkit2gtk-5.0-0 libwireshark15
libwiretap12 libwsutil13 libwxbase3.0-0v5 libwxgtk3.0-gtk3-0v5 libxerces2-java
libxml-commons-external-java libxml-commons-resolver1.1-java libxmlb-dev libxmlbeans-java libxmlunit-java
libxom-java libxpp3-java libxt-dev libxz-java libyaml-snake-java libz3-4 libz3-dev llvm llvm-15
llvm-15-dev llvm-15-linker-tools llvm-15-runtime llvm-15-tools llvm-runtime mono-4.0-gac mono-gac
mono-runtime mono-runtime-common mono-runtime-sgen mono-utils mtd-utils netkit-telnet ocaml ocaml-base
ocaml-compiler-libs ocaml-interp ocaml-man ocaml-nox oggvideotools openjdk-11-jdk-headless
openjdk-17-jdk-headless perl-modules-5.34 pgpdump procyon-decompiler pxlib1 pyqt5-dev-tools
pyqt6-dev-tools python3-asn1crypto python3-binwalk python3-botocore python3-charset-normalizer
python3-defusedxml python3-editorconfig python3-jsbeautifier python3-jsondiff python3-libarchive-c
python3-magic python3-networkx python3-opengl python3-oscrypto python3-pdfminer python3-progressbar
python3-pycryptodome python3-pydot python3-pypdf python3-pypdf2 python3-pyperclip python3-pyqt5.qtopengl
python3-pyqt6 python3-pyqt6.sip python3-pyqtgraph python3-pyxattr python3-rpm python3-rsa
python3-s3transfer python3-tlsh python3.10 python3.10-dev python3.10-minimal qt6-base-dev-tools
qt6-gtk-platformtheme qt6-qpa-plugins qt6-translations-l10n qtbase5-dev-tools qtchooser ruby3.0 sng
sqlite3 toilet toilet-fonts u-boot-tools wabt xmlbeans
Use 'apt autoremove' to remove them.
因为评论中已经问过这个问题;不,我没有删除我的 -desktop 包:
$ dpkg --get-selections | grep "ubuntu-desktop"
ubuntu-desktop install
ubuntu-desktop-minimal install
我该如何解决这个问题?我希望能够真正使用“apt autoremove”,而不必担心我的系统会变得毫无用处。
提前致谢,-nic