无法安装或删除包

无法安装或删除包

该特定消息显示在终端中

$ sudo apt-get remove bio-linux-cdbfasta
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  bio-linux-cdbfasta
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 311 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 230300 files and directories currently installed.)
Removing bio-linux-cdbfasta (1:20100722bl-3) ...
Finished removing Bio-Linux package: bio-linux-cdbfasta
/var/lib/dpkg/info/bio-linux-cdbfasta.postrm: 3: /var/lib/dpkg/info/bio-linux-
cdbfasta.postrm: /usr/bin/update-menus: not found
dpkg: error processing package bio-linux-cdbfasta (--remove):
 subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
 bio-linux-cdbfasta
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

的删除后脚本bio-linux-cdbfasta需要程序/usr/bin/update-menus,而您的设置中缺少该程序。请重新安装其软件包menu。遗憾的是,您不能直接使用

sudo apt-get install --reinstall menu

因为apt-get将首先尝试删除任何半删除的软件包,目前失败。因此,您需要手动下载(或在 中找到/var/cache/apt/archives/)并安装它:

apt-get download menu
sudo dpkg -i menu_*.deb

此后您应该能够bio-linux-cdbfasta正常卸载。

相关内容