Bar*_*run 52 package-management apt dpkg
使用sudo apt-get upgrade说明时出现错误:
dpkg: error processing libgfortran3:amd64 (--configure):
package libgfortran3:amd64 is not ready for configuration
cannot configure (current status `half-installed')
Errors were encountered while processing:
libgfortran3:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
它似乎不会阻止安装/升级其他应用程序。我相信这个问题是由于在升级应用程序时直接关闭我的 PC 造成的。
我怎样才能解决这个问题?
小智 80
对于安装了一半的包错误,--reinstall 对我有用:
sudo apt-get install --reinstall packagename
Run Code Online (Sandbox Code Playgroud)
Oli*_*Oli 46
sudo dpkg --remove --force-remove-reinstreq --dry-run libgfortran3:amd64
Run Code Online (Sandbox Code Playgroud)
那只是一个试运行。我不确定删除libgfortran3会带来什么,但运行它看看。假设它不会吞噬整个系统,请在没有 的情况下再次运行它--dry-run,然后您就可以sudo apt-get install ...返回您需要的软件包。
小智 7
sudo apt install --reinstall packagename
Run Code Online (Sandbox Code Playgroud)
这就像魅力一样。它解决了我几个月来一直遇到的问题。我的情况是包裹libmysqlcppconn7v5
我所做的只是奔跑 sudo apt install --reinstall libmysqlcppconn7v5
小智 6
我在 kibana 包中遇到了同样的“半安装包”问题。我收到以下错误:
dpkg: error processing kibana (--configure):
package kibana is not ready for configuration
cannot configure (current status 'half-installed')
Errors were encountered while processing:
kibana
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
如果有人仍然面临此类问题,那么您可以尝试以下方法:
sudo rm /var/lib/dpkg/info/kibana*
cd /var/cache/apt/archives
sudo rm kibana*
apt-get --reinstall install kibana
Run Code Online (Sandbox Code Playgroud)
这对我有用。您只需将“kibana”一词替换为安装一半的软件包名称即可。