![子进程 /usr/bin/dpkg 返回错误代码 (1)[与 sublime-text 相关]](https://linux22.com/image/1001382/%E5%AD%90%E8%BF%9B%E7%A8%8B%20%2Fusr%2Fbin%2Fdpkg%20%E8%BF%94%E5%9B%9E%E9%94%99%E8%AF%AF%E4%BB%A3%E7%A0%81%20(1)%5B%E4%B8%8E%20sublime-text%20%E7%9B%B8%E5%85%B3%5D%20.png)
每次我写命令时都会显示这个错误,我该如何解决它?错误与 coreutils 有关,所有 coreutils 包都消失了,rm 命令也不起作用?如何找回 COREUTILS LIBRARY。
$ sudo apt-get install sublime-text-installer
[sudo] password for bhavuk:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sublime-text-installer
0 upgraded, 1 newly installed, 0 to remove and 50 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,184 kB of archives.
After this operation, 26.6 kB of additional disk space will be used.
Preconfiguring packages ...
dpkg: error processing package coreutils (--configure):
package coreutils is not ready for configuration
cannot configure (current status 'half-installed')
Errors were encountered while processing:
coreutils
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
我能够解决这个问题
sudo dpkg -i /var/cache/apt/archives/coreutils_8.25-2ubuntu2_amd64.deb
sudo apt-get -f install
基本上绕过 apt 并直接重新安装 coreutils,然后让 apt 解决其余问题。