如何解决在ubuntu中安装zsh时出现nsf-common相关错误?

如何解决在ubuntu中安装zsh时出现nsf-common相关错误?

每次我安装某种软件包时,在最后阶段,apt-get install可能会返回一个常见的 nfs 相关错误。为什么安装不了就出现这个错误?

详细的粘贴在这里

这个问题与https://serverfault.com/questions/486804/what-are-the-most-common-reasons-for-nfs-auto-mounts-to-fail

答案1

每个 apt-get 安装都会报告 nfs-common 问题的原因是 apt-get 正在尝试从以前有问题的 nfs-common 安装中恢复。如果运行“dpkg -l nfs-common”,前两个字符将显示“ii”以外的状态(不确定是什么,但某种错误状态)。

根本问题似乎是:“/etc/init.d/statd not found” 该文件是 nfs-common 的一部分,因此推测它在某个时候已被无意(或故意)删除。

如果您有备份,请从中恢复该文件。如果没有,您需要从包装中取出它;你可以这样做:

cd /tmp mkdir nfs-common cd nfs-common dpkg-deb -x /var/cache/apt/archives/nfs-common* . ls -l etc/init.d/statd cp etc/init.d/statd /etc/init.d/statd

这假设 nfs-common deb 文件仍在缓存中。

一旦 /etc/init.d/statd 返回,运行:

apt-get -f install

获取 apt/dpkg 来修复软件包安装。

相关内容