在使用apt或dpkg执行任何命令时,我会得到以下错误:
dpkg: error processing package jd-gui (--remove):
installed jd-gui package pre-removal script subprocess returned error exit status 3
Errors were encountered while processing:
jd-gui我查找了这个错误,只看到了其他错误的答案,例如:
Setting up google-chrome-stable (33.0.1750.152-1) ...
/var/lib/dpkg/info/google-chrome-stable.postinst: 124: /var/lib/dpkg/info/google-chrome-stable.postinst: update-alternatives: not found
dpkg: error processing google-chrome-stable (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up bsnes (0.088-7) ...
/var/lib/dpkg/info/bsnes.postinst: 5: /var/lib/dpkg/info/bsnes.postinst: update-alternatives: not found
dpkg: error processing bsnes (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
google-chrome-stable
bsnes
E: Sub-process /usr/bin/dpkg returned an error code (1)我有什么办法解决这个问题吗?哦,在包安装不正确之后,我开始收到这个错误,所以我试着删除它,但是开始得到这个错误。
发布于 2020-06-23 22:20:57
我不确定N0rberts的答案是否解决了我的问题,但是我重新安装了ubuntu --但是这次是异种的,而不是仿生的。在安装程序时,我也有同样的错误,但这次我收到一条消息,上面写着/etc/init.d/anydesk没有标记为可执行文件。因此,我决定使用chmod +x文件,然后按照与N0rberts答案相同的步骤执行,现在一切似乎都很好,所以感谢您的回答,希望这能帮助到一些人。
发布于 2020-06-18 06:24:27
你的系统漏掉了update-alternatives 二进制。
要使它返回,您必须用以下方法重新安装dpkg包:
sudo apt-get install --reinstall dpkg然后跑
sudo dpkg --configure -a
sudo apt install -fhttps://askubuntu.com/questions/1251372
复制相似问题