far*_*lem 7 apt boot grub2 dpkg kernel
这是输出
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
linux-modules-4.15.0-33-generic linux-modules-4.15.0-34-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-4.15.0-33-generic linux-image-4.15.0-34-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 16.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 237395 files and directories currently
installed.)
Removing linux-image-4.15.0-33-generic (4.15.0-33.36) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-33-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
/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
Found Windows Boot Manager on
/dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code
127
dpkg: error processing package linux-image-4.15.0-33-generic (--
remove):
installed linux-image-4.15.0-33-generic package post-removal script
subprocess returned error exit status 1
Removing linux-image-4.15.0-34-generic (4.15.0-34.37) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-34-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
/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
Found Windows Boot Manager on
/dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code
127
dpkg: error processing package linux-image-4.15.0-34-generic (--
remove):
installed linux-image-4.15.0-34-generic package post-removal script
subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-33-generic
linux-image-4.15.0-34-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
https://i.stack.imgur.com/WaZPo.png
编辑:输出
sudo locate libcrypto.so.1.0.0
/snap/core/5897/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core/6130/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core/6350/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/594/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/677/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/70/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/74/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/kde-frameworks-5-core18/26/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
apt list libssl1*
Listing... Done
libssl1.0-dev/bionic-updates,bionic-security 1.0.2n-1ubuntu5.2 amd64
libssl1.0.0/bionic-updates,bionic-security,now 1.0.2n-1ubuntu5.2 amd64 [installed]
libssl1.1/bionic-updates,bionic-security,now 1.1.0g-2ubuntu4.3 amd64 [installed]
Run Code Online (Sandbox Code Playgroud)
小智 6
首先找到你的图书馆在哪里:
sudo locate libcrypto.so.1.0.0
Run Code Online (Sandbox Code Playgroud)
然后将其复制到您的 /usr/lib/ 文件夹中:
sudo cp /snap/gnome-3-26-1604/82/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/
Run Code Online (Sandbox Code Playgroud)
请检查您的系统上安装了什么版本的 libssl,如果我在 Ubuntu 19.04 上安装的是 libssl1.1 而不是必需的 libssl1.0。所以我必须安装libssl1.0自带的软件。最好的部分是 ubuntu 带有 snap 来安装诸如 Termius 之类的软件。然后按照“Rodrigo”的回答解决问题。
找到安装路径:
sudo locate libcrypto.so.1.0.0
然后将发现的路径添加到路径变量:
export PATH=<discovered path>:$PATH
或者将库添加到预先包含的路径:
sudo ln -s <discovered path> /usr/lib/
小智 5
在使用 Ubuntu 软件更新程序从 18.04 更新到 19.04 后,我遇到了与 OP 相同的错误。
当更新即将完成并删除旧的未使用的 linux 内核时,在更新程序驱动的 grub 配置步骤期间发生了 OP 错误。
在寻找补救措施时,我找到了 OP 的帖子并尝试了相同的步骤。当我即兴创作并找到了一个干净的解决方法时,我将其发布在这里:
lnx:~$ sudo apt-get install -f
[sudo] password for john:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
breeze-cursor-theme fonts-hack fonts-hack-ttf oxygen-icon-theme
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-4.15.0-58-generic linux-image-4.15.0-60-generic
0 to upgrade, 0 to newly install, 2 to remove and 1 not to upgrade.
2 not fully installed or removed.
After this operation, 16.7 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 205548 files and directories currently installed.)
Removing linux-image-4.15.0-58-generic (4.15.0-58.64) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-58-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 ...
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-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-58-generic (--remove):
installed linux-image-4.15.0-58-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-4.15.0-60-generic (4.15.0-60.67) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-60-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 ...
/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
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-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-60-generic (--remove):
installed linux-image-4.15.0-60-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-58-generic
linux-image-4.15.0-60-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish
Run Code Online (Sandbox Code Playgroud)
所以libcrypto.so.1.0.0没有在预期的位置找到grubcfg_proxy。遵循受访者对 OP 的建议:
lnx:~$ sudo locate libcrypto.so.1.0.0
/snap/core/7713/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core/7917/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/1192/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/1223/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/92/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/97/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Run Code Online (Sandbox Code Playgroud)
我跟进了:
lnx:~$ for l in $(sudo locate libcrypto.so.1.0.0); do md5sum $l; done
829091982233166cdaa55b41fb353609 /snap/core/7713/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
829091982233166cdaa55b41fb353609 /snap/core/7917/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
18403538a12facf8aced1dcfcccef1ba /snap/core18/1192/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
18403538a12facf8aced1dcfcccef1ba /snap/core18/1223/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
829091982233166cdaa55b41fb353609 /snap/gnome-3-26-1604/92/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
829091982233166cdaa55b41fb353609 /snap/gnome-3-26-1604/97/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
md5sum: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0: No such file or directory
Run Code Online (Sandbox Code Playgroud)
啊哈!/usr/lib/x86_64-linux-gnu/一定是grubcfg_proxy需要找到的位置libcrypto.so.1.0.0。
其他哪个到cp -p,ln或ln -s到预期位置?md5 签名告诉我哪些文件是相同的字节内容。是否有相同的实际文件?
lnx:~$ for l in $(sudo locate libcrypto.so.1.0.0); do ls -il $l; done
2134 -rw-r--r-- 1 root root 2365952 Feb 27 2019 /snap/core/7713/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
2134 -rw-r--r-- 1 root root 2365952 Feb 27 2019 /snap/core/7917/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
5689 -rw-r--r-- 1 root root 2357760 Feb 27 2019 /snap/core18/1192/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
5690 -rw-r--r-- 1 root root 2357760 Feb 27 2019 /snap/core18/1223/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
165 -rw-r--r-- 1 root root 2365952 Feb 27 2019 /snap/gnome-3-26-1604/92/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
165 -rw-r--r-- 1 root root 2365952 Feb 27 2019 /snap/gnome-3-26-1604/97/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
ls: cannot access '/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0': No such file or directory
Run Code Online (Sandbox Code Playgroud)
第 1 列中的 inode 编号显示 的实例libcrypto.so.1.0.0,第 3 列中的硬链接计数 1 显示符号链接涉及提供多条路径。
我决定只需要将cp -p其中一个文件放到正确的位置即可解决问题。我应该选择两种不同的 md5 签名/逐字节不同的内容选项中的哪一种?
经过一番谷歌搜索,我发现它/snap/core/...基于 ubuntu 16.04,并且/snap/core18/...基于 ubuntu 18.04。
我倾向于/snap/core18/.../libcrypto.so.1.0.0。
事实证明,一些检查后/snap/core18/.../libcrypto.so.1.1,并/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1是相同的按字节,所以我决定把/usr/lib/x86_64-linux-gnu/libcrypto.so.1.*所有的Ubuntu 18.04。
我将文件复制到位并sudo apt-get install -f再次运行。瞧!grubcfg_proxy很高兴,旧内核被删除。
lnx:~$ sudo cp -p /snap/core18/1223/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
lnx:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
breeze-cursor-theme fonts-hack fonts-hack-ttf oxygen-icon-theme
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-4.15.0-58-generic linux-image-4.15.0-60-generic
0 to upgrade, 0 to newly install, 2 to remove and 1 not to upgrade.
2 not fully installed or removed.
After this operation, 16.7 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 205548 files and directories currently installed.)
Removing linux-image-4.15.0-58-generic (4.15.0-58.64) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-58-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 ...
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found Windows 10 on /dev/sda1
Found Windows 10 on /dev/sda1
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 10 on /dev/sda1
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Removing linux-image-4.15.0-60-generic (4.15.0-60.67) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-60-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 ...
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found Windows 10 on /dev/sda1
Found Windows 10 on /dev/sda1
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 10 on /dev/sda1
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Run Code Online (Sandbox Code Playgroud)
我现在可以继续从 ubuntu 19.04 更新到 19.10,/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0我的磁盘上只有18.04的“粗暴” ,也许可以帮助未来的包管理问题。首先,为了更好的衡量:
john@jameskb-lnx:~$ sudo apt-get install -f
[sudo] password for john:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
breeze-cursor-theme fonts-hack fonts-hack-ttf oxygen-icon-theme
Use 'sudo apt autoremove' to remove them.
Run Code Online (Sandbox Code Playgroud)
看来我可以多清理一点;)
| 归档时间: |
|
| 查看次数: |
31610 次 |
| 最近记录: |