我的 nvidia-361 包损坏了

我的 nvidia-361 包损坏了

从 16.04 更新到 16.10 后,nvidia-361 驱动程序的过渡包开始出现错误。

这是消息(一些数据从 BG 翻译为 EN):

Preparation for the unpacking of nvidia-352_361.45.11-0ubuntu4_amd64.deb ...
Failed to stop var-lib-snapd-lib-gl.mount: Unit var-lib-snapd-lib-gl.mount not loaded.
dpkg: warning: under process old pre-removal script returned error status out of 5

dpkg: trying script from the new package instead ...
dpkg: error processing archive /tmp/apt-dpkg-install-9wUQ2T/8-nvidia-352_361.45.11-0ubuntu4_amd64.deb (--unpack):
 no script in the new version of the package - I surrender (or something like it)
Failed to get unit file state for var-lib-snapd-lib-gl.mount: No such file or directory
var-lib-snapd-lib-gl.mount is a disabled or a static unit, not starting it.
Error in the process:
 /tmp/apt-dpkg-install-9wUQ2T/8-nvidia-352_361.45.11-0ubuntu4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

编辑:似乎我忘记了一些数据(在前面的文字中添加):

Preparation for the unpacking of nvidia-352_361.45.11-0ubuntu4_amd64.deb ...
Failed to stop var-lib-snapd-lib-gl.mount: Unit var-lib-snapd-lib-gl.mount not loaded.
dpkg: warning: under process old pre-removal script returned error status out of 5

答案1

我会丢弃该软件包并重新开始。我不确定你从哪里获得它,但听起来 deb 软件包已损坏,因为它无法解压。你可以尝试从以下位置手动下载 deb 软件包这里并使用命令 gdebi 手动安装gdebi nvidia-352_361.45.11-0ubuntu4_amd64.deb,或者aptitude使用命令aptitude install nvidia-352_361.45.11-0ubuntu4_amd64.deb

gdebi

   lets you install local deb packages resolving and installing its
   dependencies. apt does the  same,  but  only  for  remote  (http,  ftp)
   located packages.

只要你能获得未损坏的软件包,其中任何一个都可以解决问题。

编辑:这个软件包中似乎没有太多内容,除了包含有关重新分发 NVIDIA 图形驱动程序的讨论的版权声明。在这种情况下,您可能希望安装这个包以适合您的版本和架构。

资料来源:

man gdebi

https://linux.die.net/man/8/aptitude

http://packages.ubuntu.com/search?suite=yakkety&arch=amd64&searchon=names&keywords=nvidia

答案2

我解决了这个问题。sudo touch /lib/systemd/system/var-lib-snapd-lib-gl.mount然后放了一个虚拟文件(不可用的文件)sudo apt purge nvidia*。多次重启等。

完整答案是这里

相关内容