断开的依赖关系尚未解决

断开的依赖关系尚未解决

当我安装

sudo apt-get install dhcp3-server tftpd-hpa syslinux nfs-kernel-server initramfs-tools 

我收到错误。之后我想修复损坏的依赖关系问题,我尝试了

ashokkrishna@ashokkrishna-Lenovo-B560:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libmysqlclient18 mysql-common setools
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  initramfs-tools nfs-common rpcbind
Suggested packages:
  open-iscsi watchdog
The following packages will be upgraded:
  initramfs-tools nfs-common rpcbind
3 upgraded, 0 newly installed, 0 to remove and 591 not upgraded.
10 not fully installed or removed.
Need to get 0 B/258 kB of archives.
After this operation, 857 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 210379 files and directories currently installed.)
Preparing to unpack .../initramfs-tools_0.103ubuntu4.2_all.deb ...
dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): Permission denied
dpkg: error processing archive /var/cache/apt/archives/initramfs-tools_0.103ubuntu4.2_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
dpkg (subprocess): unable to execute new post-removal script (/var/lib/dpkg/tmp.ci/postrm): Permission denied
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 2
Preparing to unpack .../rpcbind_0.2.1-2ubuntu2.1_i386.deb ...
dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): Permission denied
dpkg: error processing archive /var/cache/apt/archives/rpcbind_0.2.1-2ubuntu2.1_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
dpkg (subprocess): unable to execute new post-removal script (/var/lib/dpkg/tmp.ci/postrm): Permission denied
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 2
Preparing to unpack .../nfs-common_1%3a1.2.8-6ubuntu1.1_i386.deb ...
dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): Permission denied
dpkg: error processing archive /var/cache/apt/archives/nfs-common_1%3a1.2.8-6ubuntu1.1_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
dpkg (subprocess): unable to execute new post-removal script (/var/lib/dpkg/tmp.ci/postrm): Permission denied
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/initramfs-tools_0.103ubuntu4.2_all.deb
 /var/cache/apt/archives/rpcbind_0.2.1-2ubuntu2.1_i386.deb
 /var/cache/apt/archives/nfs-common_1%3a1.2.8-6ubuntu1.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

如果包含脚本的位置(本例中为 /var)已使用该noexec选项挂载,则可能会发生这种情况。您可以通过运行 来确认这一点mount。如果是这样,请修改 /etc/fstab 并重新挂载。

相关内容