ncurses-bin 安装失败,显示“无法为‘./usr/bin/infotocap’创建备份符号链接:没有此文件或目录”

ncurses-bin 安装失败,显示“无法为‘./usr/bin/infotocap’创建备份符号链接:没有此文件或目录”

由于某些未知原因,我的 Ubuntu 15.10 上的软件包依赖关系混乱了。sudo apt-get -f install安装失败,ncurses-bin因为

unable to make backup symlink for './usr/bin/infotocap': No such file or directory

intotocap作为一个愚蠢的解决方法,我尝试创建一个相对于当前目录的空文件和目录.并更改当前目录,但是/、、和没有起作用。/root/tmp$HOME

我解压了.deb档案并查找intotocap,但是没有出现这种情况,这让我很困惑。

No apport report written because the error message indicates an issue on the local system打印到控制台,这对我来说没有意义,因为尝试备份不存在的目录是一个安装脚本,即没有本地,对我来说是错误。

完整输出:

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  ifupdown libncurses5 libncurses5:i386 libncurses5-dev libncursesw5 libpam-systemd libplymouth4 libsmartcols1 libsystemd0 libsystemd0:i386 libtinfo-dev libtinfo5-dbg
  libudev-dev libudev1 libudev1:i386 mdadm ncurses-bin plymouth plymouth-label plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-text systemd systemd-dbg udev util-linux
Suggested packages:
  rdnssd ncurses-doc desktop-base plymouth-themes systemd-ui systemd-container util-linux-locales
The following packages will be upgraded:
  ifupdown libncurses5 libncurses5:i386 libncurses5-dev libncursesw5 libpam-systemd libplymouth4 libsmartcols1 libsystemd0 libsystemd0:i386 libtinfo-dev libtinfo5-dbg
  libudev-dev libudev1 libudev1:i386 mdadm ncurses-bin plymouth plymouth-label plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-text systemd systemd-dbg udev util-linux
25 upgraded, 0 newly installed, 0 to remove and 3984 not upgraded.
2 not fully installed or removed.
Need to get 0 B/38,0 MB of archives.
After this operation, 2.551 kB of additional disk space will be used.
Do you want to continue? [J/n] j
Preconfiguring packages ...
(Reading database ... 971243 files and directories currently installed.)
Preparing to unpack .../ncurses-bin_6.0+20160213-1ubuntu1_amd64.deb ...
Unpacking ncurses-bin (6.0+20160213-1ubuntu1) over (5.9+20150516-2ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/ncurses-bin_6.0+20160213-1ubuntu1_amd64.deb (--unpack):
 unable to make backup symlink for './usr/bin/infotocap': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Processing triggers for man-db (2.7.4-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/ncurses-bin_6.0+20160213-1ubuntu1_amd64.deb

我在 15.10 上遇到了几个月的错误(也报告在https://bugs.launchpad.net/ubuntu/+source/ncurses/+bug/1523196),但它从未阻止我安装软件包。没有,我做了,sudo do-release-upgrade --devel-release因为我想测试 16.04 的一些功能。VirtualBox 中的升级没有问题,所以我确信这不是使用未发布的 16.04 软件包的问题。

我无法卸载,ncurses-bin因为它是一个基本软件包。

答案1

这是由于/usr/bin/infotocap符号链接本身造成的(这对我来说没有意义)。我删除了符号链接并sudo apt-get -f install再次调用。我建议dpkghttps://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1552957

答案2

我发现这个有类似的错误。

Preparing to unpack .../binutils-x86-64-linux-gnu_2.37.90.20220123-2_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.37.90.20220123-2) over (2.37-10.1) ...
dpkg: error processing archive /var/cache/apt/archives/binutils-x86-64-linux-gnu_2.37.90.20220123-2_amd64.deb (--unpack):
 unable to make backup symlink for './usr/bin/x86_64-linux-gnu-gold': No such file or directory

也可以通过卸载“binutils”和相关包来解决,直到升级重新开始工作。运行sudo apt --fix-broken install并没有解决问题。

相关内容