今天我对我的 Ubuntu 14.10 安装进行了更新,更新后我收到一些关于 nvidia-331 驱动程序的错误,所以我想删除它并重新安装,但每次这样做时 apt-get purge nvidia-331 都会失败,然后我收到此错误
devh@devh-PC:~$ sudo apt-get -y purge nvidia-331
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-generic linux-image-generic thermald
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
nvidia-331
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 184 MB disk space will be freed.
(Reading database ... 243902 files and directories currently installed.)
Removing nvidia-331 (331.113-0ubuntu0.1) ...
stop: Unknown job: nvidia-persistenced
userdel: user nvidia-persistenced is currently used by process 1612
dpkg: error processing package nvidia-331 (--remove):
subprocess installed post-removal script returned error exit status 8
Errors were encountered while processing:
nvidia-331
E: Sub-process /usr/bin/dpkg returned an error code (1)
当我尝试安装任何其他包时,出现同样的错误。
答案1
我看到你已经解决了你的问题。这只是为那些以适当的答案形式寻找类似问题答案的人提供参考。
我在使用驱动程序时也遇到了同样的问题。为了解决这个问题,我做了以下事情:
打开终端
运行
sudo apt-get purge nvidia-331
。这不起作用,但请注意它在抱怨时提到的进程 ID:userdel: user nvidia-persistenced is currently used by process 1612
运行
sudo kill [process_id]
以终止上述进程。请注意,您的进程 ID 肯定会有所不同,不要使用上面的进程 ID!然后重新运行
sudo apt-get purge nvidia-331
现在它应该可以工作了。