子进程 /usr/bin/dpkg 返回错误代码 (1)[与 sublime-text 相关]

子进程 /usr/bin/dpkg 返回错误代码 (1)[与 sublime-text 相关]

每次我写命令时都会显示这个错误,我该如何解决它?错误与 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 解决其余问题。

相关内容