libzstd 已被删除,现在 dpkg 或 apt 不再工作

libzstd 已被删除,现在 dpkg 或 apt 不再工作

我无法再使用apt或运行任何东西dpkg。例如,

$ sudo apt install sl
apt: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory

我尝试通过libzstd以下方式手动安装:

$ wget http://ftp.us.debian.org/debian/pool/main/libz/libzstd/libzstd1_1.4.8+dfsg-1_amd64.deb
$ sudo dpkg -i libzstd1_1.4.8+dfsg-1_amd64.deb
dpkg-deb: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory
dpkg: error processing archive libzstd1_1.4.8+dfsg-1_amd64.deb (--install):
 dpkg-deb --control subprocess returned error exit status 127
Errors were encountered while processing:
 libzstd1_1.4.8+dfsg-1_amd64.deb

这是在我从私有存储库 ( quicksilver-rocksdb)中卸载了一个与libzstd.我/var/log/apt/term.log按照此处的建议附上我的相关部分:https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1764858发生在跑步时sudo apt remove quicksilver-rocksdb

Log started: 2021-01-21  15:18:07
Selecting previously unselected package libllvm11:amd64.^M
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 274377 files and directories currently installed.)^M
Preparing to unpack .../0-libllvm11_1%3a11.0.0-2~ubuntu20.04.1_amd64.deb ...^M
Unpacking libllvm11:amd64 (1:11.0.0-2~ubuntu20.04.1) ...^M
Preparing to unpack .../1-mesa-vulkan-drivers_20.2.6-0ubuntu0.20.04.1_amd64.deb ...^M
Unpacking mesa-vulkan-drivers:amd64 (20.2.6-0ubuntu0.20.04.1) over (20.0.8-0ubuntu1~20.04.1) ...^M
Preparing to unpack .../2-libxatracker2_20.2.6-0ubuntu0.20.04.1_amd64.deb ...^M
Unpacking libxatracker2:amd64 (20.2.6-0ubuntu0.20.04.1) over (20.0.8-0ubuntu1~20.04.1) ...^M
Preparing to unpack .../3-libgbm1_20.2.6-0ubuntu0.20.04.1_amd64.deb ...^M
Unpacking libgbm1:amd64 (20.2.6-0ubuntu0.20.04.1) over (20.0.8-0ubuntu1~20.04.1) ...^M
Preparing to unpack .../4-libegl-mesa0_20.2.6-0ubuntu0.20.04.1_amd64.deb ...^M
Unpacking libegl-mesa0:amd64 (20.2.6-0ubuntu0.20.04.1) over (20.0.8-0ubuntu1~20.04.1) ...^M
Preparing to unpack .../5-libglx-mesa0_20.2.6-0ubuntu0.20.04.1_amd64.deb ...^M
Unpacking libglx-mesa0:amd64 (20.2.6-0ubuntu0.20.04.1) over (20.0.8-0ubuntu1~20.04.1) ...^M
Preparing to unpack .../6-libglapi-mesa_20.2.6-0ubuntu0.20.04.1_amd64.deb ...^M
Unpacking libglapi-mesa:amd64 (20.2.6-0ubuntu0.20.04.1) over (20.0.8-0ubuntu1~20.04.1) ...^M
Preparing to unpack .../7-libgl1-mesa-dri_20.2.6-0ubuntu0.20.04.1_amd64.deb ...^M
Unpacking libgl1-mesa-dri:amd64 (20.2.6-0ubuntu0.20.04.1) over (20.0.8-0ubuntu1~20.04.1) ...^M
Preparing to unpack .../8-libapt-pkg6.0_2.0.4_amd64.deb ...^M
Unpacking libapt-pkg6.0:amd64 (2.0.4) over (2.0.2ubuntu0.2) ...^M
Setting up libapt-pkg6.0:amd64 (2.0.4) ...^M
^[[1mdpkg:^[[0m quicksilver-rocksdb: dependency problems, but removing anyway as you requested:^M
 squashfs-tools depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 mesa-vulkan-drivers:amd64 depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libxatracker2:amd64 depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libwireshark13:amd64 depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libtiff5:amd64 depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libsereal-encoder-perl depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libsereal-decoder-perl depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libgl1-mesa-dri:amd64 depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libboost-iostreams1.71.0:amd64 depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libarchive13:amd64 depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 libapt-pkg6.0:amd64 depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
 dpkg depends on libzstd1 (>= 1.3.2); however:^M
  Package libzstd1 is not installed.^M
  Package quicksilver-rocksdb which provides libzstd1 is to be removed.^M
^M
^M
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 274386 files and directories currently installed.)^M
Removing quicksilver-rocksdb (6.6.4-cloudflare.3-1) ...^M
^[[1mdpkg:^[[0m ^[[1;33mwarning:^[[0m while removing quicksilver-rocksdb, directory '/usr/local/share/man/man1' not empty so not removed^M
^[[1mdpkg:^[[0m ^[[1;33mwarning:^[[0m while removing quicksilver-rocksdb, directory '/usr/local/lib' not empty so not removed^M
dpkg-deb: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory^M
^[[1mdpkg:^[[0m error processing archive /var/cache/apt/archives/libzstd1_1.4.4+dfsg-3_amd64.deb (--unpack):^M
 dpkg-deb --control subprocess returned error exit status 127^M
Errors were encountered while processing:^M
 /var/cache/apt/archives/libzstd1_1.4.4+dfsg-3_amd64.deb^M
Log ended: 2021-01-21  15:18:11

此外,我libzstd1_1.4.4+dfsg-3_amd64.deb从中删除了/var/cache/apt/archives/此处提到的内容error processing archive /var/cache/apt/archives/libzstd1_1.4.4+dfsg-3_amd64.deb (--unpack):,以便能够执行libzstd1using的重新安装dpkg -i,但我仍然没有成功执行此操作,并出现与开头提到的相同错误,即:

$ sudo dpkg -i libzstd1_1.4.8+dfsg-1_amd64.deb
dpkg-deb: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory
dpkg: error processing archive libzstd1_1.4.8+dfsg-1_amd64.deb (--install):
 dpkg-deb --control subprocess returned error exit status 127
Errors were encountered while processing:
 libzstd1_1.4.8+dfsg-1_amd64.deb

类似问题的一个答案是运行以​​下命令:

$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of mesa-vulkan-drivers:amd64:
 mesa-vulkan-drivers:amd64 depends on libzstd1 (>= 1.3.2); however:
  Package libzstd1 is not installed.

dpkg: error processing package mesa-vulkan-drivers:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgl1-mesa-dri:amd64:
 libgl1-mesa-dri:amd64 depends on libzstd1 (>= 1.3.2); however:
  Package libzstd1 is not installed.

dpkg: error processing package libgl1-mesa-dri:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libxatracker2:amd64:
 libxatracker2:amd64 depends on libzstd1 (>= 1.3.2); however:
  Package libzstd1 is not installed.

dpkg: error processing package libxatracker2:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libglx-mesa0:amd64:
 libglx-mesa0:amd64 depends on libgl1-mesa-dri; however:
  Package libgl1-mesa-dri:amd64 is not configured yet.

dpkg: error processing package libglx-mesa0:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mesa-vulkan-drivers:amd64
 libgl1-mesa-dri:amd64
 libxatracker2:amd64
 libglx-mesa0:amd64

其次是

$ sudo apt --fix-broken install
apt: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory

但这显然也不起作用。

答案1

我通过复制安装在运行我的 Ubuntu 版本的另一台计算机上并在同一目录中/usr/lib/x86_64-linux-gnu/libzstd.so.1.4.4创建符号链接文件libzstd.so.1来解决这个问题。libzstd.so.1.4.4/usr/lib/x86_64-linux-gnu/

相关内容