如何修復損壞或未完全安裝的軟體包?

如何修復損壞或未完全安裝的軟體包?

在虛擬機器上運行後apt update && apt upgrade -y,我收到以下錯誤libssl1.1:amd64

dpkg --configure -a
Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.2) ...
Checking for services that may need to be restarted...done.
Checking for services that may need to be restarted...done.
Checking init scripts...
dpkg: error processing package libssl1.1:amd64 (--configure):
 installed libssl1.1:amd64 package post-installation script subprocess returned error exit status 10
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
 libssl1.1:amd64

dpkg-reconfigure libssl1.1:amd64
/usr/sbin/dpkg-reconfigure: libssl1.1:amd64 is broken or not fully installed

這是我的伺服器訊息,

uname -a
Linux remote 4.15.0-1040-aws #42-Ubuntu SMP Fri May 17 13:47:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

這對於任何 Linux 發行版來說都是至關重要的軟體包,我不能簡單地卸載它然後重新安裝它,即apt remove libssl1.1 && apt install libssl1.1

另外,這就是 . 返回的內容--reinstall

apt install --reinstall libssl1.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for libssl1.1:amd64

錯誤報告

已安裝的 libssl1.1:amd64 軟體包安裝後腳本子進程回傳錯誤退出狀態 10 --https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1832919

答案1

解決方法來自錯誤報告,

sudo dpkg-reconfigure libc6
sudo dpkg --configure libssl1.1

相關內容