我无法安装或删除任何软件包,因为我一直收到此错误:子进程安装的预删除脚本返回错误退出状态 127

我无法安装或删除任何软件包,因为我一直收到此错误:子进程安装的预删除脚本返回错误退出状态 127

我为打印机安装了 cups 包装器,但它坏了。现在 Store 和 Synaptic 都无法安装或删除任何软件包,因为“mfc240ccupswrapper”无法修复或更改。我尝试过强制删除它,但没有成功。

这是尝试删除该包的输出:

Removing mfc240ccupswrapper ...
/var/lib/dpkg/info/mfc240ccupswrapper.prerm: 3: /usr/local/Brother/Printer/mfc240c/cupswrapper/cupswrappermfc240c: not found
dpkg: error processing mfc240ccupswrapper (--remove):
 subprocess installed pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
/var/lib/dpkg/info/mfc240ccupswrapper.postinst: 3: /usr/local/Brother/Printer/mfc240c/cupswrapper/cupswrappermfc240c: not found
chmod: cannot access `/usr/local/Brother/Printer/mfc240c/cupswrapper': No such file or directory
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mfc240ccupswrapper

答案1

因此,在终端中尝试了几个命令以尝试强制删除它之后,我终于能够弄清楚该软件包尚未完全安装。所以我打开了 DEB 文件,复制了其余文件,并使用“gksudo nautilus”获取 root 访问权限,我粘贴了其余文件,其中包括错误中提到的缺失的文件夹。然后 Synaptic 能够修复该软件包,我能够永久删除它。

答案2

尝试这个 dpkg --remove --force-remove-reinstreq mfc240ccupswrapper

相关内容