升级到 Ubuntu 20.04 LTS 后无法安装“附加驱动程序”

升级到 Ubuntu 20.04 LTS 后无法安装“附加驱动程序”

概括:

从 Ubuntu 18.04 LTS 升级到 Ubuntu 20.04 LTS 后,我无法安装其他驱动程序。我收到以下错误消息:

Unable to install "Additional Drivers":
Error while installing package: installed linux-image-4.15.0-88-
generic package post-removal script subprocess returned
error exit status 1

系统: Dell Precision 5510 移动工作站、32GB RAM、1TB Samsung NVMe 硬盘;与 Windows 7 Pro-64 双启动

细节:

如果我尝试手动删除软件包linux-image-4.15.0-88-generic,就会失败。我陷入困境。而且似乎我无法添加/删除任何其他软件包。

% sudo apt remove linux-image-4.15.0-88-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  browser-plugin-evince g++-7 gir1.2-mutter-2 libargon2-0 libavutil55 libbasicusageenvironment1 libboost-chrono1.65.1 libboost-iostreams1.65.1
  libboost-locale1.65.1 libcapnp-0.6.1 libcdio17 libdouble-conversion1 libdrm-dev libdvdread4 libebml4v5 libfluidsynth1 libgdbm5 libgfortran4 libglade2-0
  libgmime-3.0-0 libgnome-desktop-3-17 libgspell-1-1 libgtkmm-2.4-1v5 libicu60 libip4tc0 libiptc0 libisc169 libisl19 libjson-c3 libllvm9:i386 liblwres160
  libmagickcore-6.q16-3 libmutter-2-0 libmysofa0 libnfs11 libnss-myhostname libnvidia-common-435 libnvidia-compute-435 libnvidia-compute-435:i386
  libnvidia-decode-435:i386 libnvidia-encode-435 libnvidia-ifr1-435 libnvidia-ifr1-435:i386 libperl5.26 libplacebo7 libpoppler73 libpostproc54
  libprotobuf10 libproxy-tools libqpdf21 libraw16 libresid-builder0c2a libssh2-1 libtinfo-dev libtinfo5:i386 libusageenvironment3 libvlc5 libvlccore9
  libx265-146 libx86emu1 libxcb-glx0-dev libxcb-render0-dev libxcb-sync-dev libxfixes-dev libxshmfence-dev linux-headers-4.15.0-99
  linux-modules-4.15.0-99-generic nvidia-compute-utils-435 nvidia-dkms-435 nvidia-kernel-common-435 php-cli php-common php-xml php7.4-cli php7.4-common
  php7.4-json php7.4-opcache php7.4-readline php7.4-xml python-cairo python-fasteners python-gobject-2 python-gtk2 python-lockfile python-monotonic
  python-six python3-asn1crypto python3-oauth qt4-qmake socat ubuntu-web-launchers vlc-data vlc-plugin-video-output
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-4.15.0-88-generic linux-image-4.15.0-99-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 16.8 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 331573 files and directories currently installed.)
Removing linux-image-4.15.0-88-generic (4.15.0-88.88) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-88-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
using custom appearance settings
Found linux image: /boot/vmlinuz-5.4.0-58-generic
Found initrd image: /boot/initrd.img-5.4.0-58-generic
Found linux image: /boot/vmlinuz-4.15.0-128-generic
Found initrd image: /boot/initrd.img-4.15.0-128-generic
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-4.15.0-88-generic (--remove):
 installed linux-image-4.15.0-88-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-4.15.0-88-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

当我检查已安装的linux-image软件包时,我得到以下信息:

% aptitude search linux-image | grep -v ^p
v  linux-image - 
c  linux-image-4.13.0-45-generic - 
i A linux-image-4.15.0-128-generic - Signed kernel image generic
c  linux-image-4.15.0-74-generic - 
c  linux-image-4.15.0-76-generic - 
Bd linux-image-4.15.0-88-generic - Signed kernel image generic
H  linux-image-4.15.0-99-generic - Signed kernel image generic
i A linux-image-5.4.0-58-generic - Signed kernel image generic
c  linux-image-extra-4.10.0-28-generic - 
c  linux-image-extra-4.10.0-42-generic - 
i A linux-image-generic - Generic Linux kernel image
v  linux-image-oem-5.6 - 

我被困住了。我该如何删除这个包或修复错误?我自己没有做过任何包管理。我所做的只是通过软件更新小部件从 18.04 LTS“升级”到 20.04 LTS。

短暂性脑缺血。

答案1

解决了!

概括:

加密库 libcrypto.so.1.0.0 不在正常位置。使用命令“locate”查找二进制文件“libcrypto.so.1.0.0”的现有副本,然后使用“cp -p”将其复制到位。

细节:

我编辑了此主题中的第一篇帖子,并用粗体和红色突出显示了关键错误消息。原来问题是 grub 相关命令找不到加密库 libcrypto.so.1.0.0。Google 搜索字符串“ubuntu /etc/grub.d/bin/grubcfg_proxy:加载共享库时出错:libcrypto.so.1.0.0 无法打开共享对象文件:没有此文件或目录“出现了几个结果。看来我也遇到了同样的问题: https://answers.launchpad.net/ubuntu/+question/692335。该解决方案实际上由 JohnK 在此处记录:

https://askubuntu.com/a/1185815/1037505

就我而言:

% **sudo locate libcrypto.so.1.0.0**
/opt/google/earth/pro/libcrypto.so.1.0.0
/snap/core/10444/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core/9066/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/1754/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/1932/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/100/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/98/lib/x86_64-linux-gnu/libcrypto.so.1.0.0

JohnK 在我刚刚链接了他的解决方案的线程中确定 /snap/core18/... 有适用于 Ubuntu 18.04 的二进制文件。因此,我将其中一个二进制文件复制到 /usr/lib/x86_64-linux-gnu/:

% cp -p /snap/core18/1754/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/usr/lib/x86_64-linux-gnu/

此后,所有包命令(例如 apt、aptitude、dpkg)均成功运行。

我运行了以下命令,这些命令是我在这个网页()上找到的,希望能让我的系统的包系统恢复正常:

% sudo dapt-get update --fix-missing
% sudo dpkg --configure -a
% sudo apt-get install -f

相关内容