从 18.10 升级到 19.04 后 - 我开始看到一个围绕 linux-image-4.18.0-24-generic 的错误,似乎导致我更新以及更新 grub...有人遇到过这种情况吗?或者有人可以指导我如何修复此问题?
运行此命令后sudo apt update && sudo apt upgrade
,我在终端收到此错误:
"Do you want to continue? [Y/n] y
(Reading database ... 238003 files and directories currently installed.)
Removing linux-image-4.18.0-24-generic (4.18.0-24.25) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.18.0-24-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
/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.18.0-24-generic (--remove):
installed linux-image-4.18.0-24-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.18.0-24-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
此外,当尝试进行部分升级时,系统提示内核未安装,并失败
更新: 根据要求,我在这里发布每个命令的输出
dpkg -S /etc/grub.d/bin/grubcfg_proxy
dpkg-query: no path found matching pattern /etc/grub.d/bin/grubcfg_proxy
ldd /etc/grub.d/bin/grubcfg_proxy
linux-vdso.so.1 (0x00007ffe12df1000)
libcrypto.so.1.0.0 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4ed9660000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4ed9646000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4ed945b000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4ed930d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4ed9867000)
apt-cache policy grub-customizer - **grub-customizer:
Installed: 5.1.0-1
Candidate: 5.1.0-1
Version table:
* 5.1.0-1 500
500 http://it-mirrors.evowise.com/ubuntu disco/universe amd64 Packages
100 /var/lib/dpkg/status
which grub-customizer
/usr/bin/grub-customizer
更新 2:按照此处的建议移动两个文件后,输出为
sudo apt-get upgrade
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
linux-image-4.18.0-24-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 8,573 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 237928 files and directories currently installed.)
Removing linux-image-4.18.0-24-generic (4.18.0-24.25) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.18.0-24-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
using custom appearance settings
/etc/grub.d/21_memtest86+_proxy: 3: /etc/grub.d/21_memtest86+_proxy: /etc/grub.d/bin/grubcfg_proxy: not found
Found memtest86+ image: /boot/memtest86+.elf
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-4.18.0-24-generic (--remove):
installed linux-image-4.18.0-24-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.18.0-24-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
分析源代码说这grubcfg_proxy
与包有关grub-customizer
。
一开始我找不到它出现在/etc/grub.d/bin/grubcfg_proxy
你系统上的原因。这实际上是旧版本,但当前版本不行。
其次,奇怪的是它尝试加载libcrypto.so.1.0.0
,而常规的 Ubuntu 19.04 已libcrypto.so.1.1
加载(附带libssl1.1
包裹)
第三个时刻grubcfg_proxy
是迪斯科更名为grubcfg-proxy
并位于/usr/lib/grub-customizer/grubcfg-proxy
。
所以我建议将二进制文件移开
sudo mv /etc/grub.d/bin/grubcfg_proxy ~/
然后为了完全确定,我建议清除当前版本的 GRUB Customizer
sudo apt-get purge grub-customizer
然后更新 GRUB 配置:
sudo update-grub
最后安装升级:
sudo apt-get upgrade
如果你需要使用grub-customizer
官方存储库安装其软件包
sudo apt-get install grub-customizer
并像以前一样使用它。
答案2
在从 ubuntu 18.04 更新到 19.04 的清理阶段,我遇到了同样的问题,grubcfg_proxy
没有在预期位置找到。libcrypto.so.1.0.0
我在这里发布了对相关共享库丢失问题的修复: