从 16.04 升级后,我无法在 Ubuntu 18.04 系统上更新或安装新软件。
sudo apt-get update
返回...
Hit:1 http://nl.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://nl.archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Get:3 http://nl.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Get:5 http://nl.archive.ubuntu.com/ubuntu bionic-updates/universe Sources [283 kB]
Get:6 http://nl.archive.ubuntu.com/ubuntu bionic-updates/main Sources [319 kB]
Get:7 http://nl.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [949 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe Sources [170 kB]
Get:9 http://nl.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [684 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main Sources [150 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [725 kB]
Get:12 http://nl.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [304 kB]
Get:13 http://nl.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1076 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [473 kB]
Get:15 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [42,6 kB]
Get:16 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [667 kB]
Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [622 kB]
Get:18 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [222 kB]
Get:19 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42,1 kB]
Get:20 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2464 B]
Get:21 http://nl.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [1017 kB]
Get:22 http://nl.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [273 kB]
Get:23 http://nl.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2468 B]
Get:24 http://nl.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7968 B]
Fetched 8282 kB in 3s (2743 kB/s)
appstreamcli: error while loading shared libraries: libappstream.so.4: cannot open shared object file: No such file or directory
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'
E: Sub-process returned an error code
在过去的几个月里,我尝试了很多方法,比如手动安装这些东西,但是......
sudo apt install libappstream4
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libappstream4 : Depends: libstemmer0d (>= 0+svn527) but it is not going to be installed
libdbus-1-dev : Depends: libdbus-1-3 (= 1.12.2-1ubuntu1.1) but 1.10.6-1ubuntu3.4 is to be installed
libgdk-pixbuf2.0-dev : Depends: gir1.2-gdkpixbuf-2.0 (= 2.36.11-2) but 2.32.2-1ubuntu1.6 is to be installed
Depends: libpng-dev (>= 1.6)
Depends: libpng-dev (< 1.7)
libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.4-0ubuntu0.18.04.4) but 2.48.2-0ubuntu4.4 is to be installed
libglib2.0-dev : Depends: libglib2.0-0 (= 2.56.4-0ubuntu0.18.04.4) but 2.48.2-0ubuntu4.4 is to be installed
libproxy1-plugin-gsettings : Depends: libproxy1v5 (= 0.4.15-1) but 0.4.11-5ubuntu1 is to be installed
python3-distutils : Depends: python3 (>= 3.6.6-1~) but 3.5.1-3 is to be installed
python3-lib2to3 : Depends: python3 (>= 3.6.6-1~) but 3.5.1-3 is to be installed
systemd : Depends: libsystemd0 (= 229-4ubuntu21.22) but 237-3ubuntu10.29 is to be installed
udev : Depends: libudev1 (= 229-4ubuntu21.22) but 237-3ubuntu10.29 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
甚至 ....
apt-get -f install
无法解决我的问题
也不
sudo apt update
sudo apt-get update -y
https://zoomadmin.com/HowToInstall/UbuntuPackage/libappstream4
不久前,我通过终端命令从 16.0x 升级到了 18.04,一切正常,我没有安装很多软件,实际上几乎没有安装什么,除了更新 Apache 和 PHP。甚至 GNOME Shell GUI 也失败了。
怎么修?