trouble installing nvidia-cuda-toolkit

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
drsly
Posts: 1
Joined: 2015-07-11 05:02

trouble installing nvidia-cuda-toolkit

#1 Post by drsly »

I thought I would share my experiences trying to install nvidia-cuda-toolkit through the debian repo, and invite anyone so inclined to comment. This writeup is from memory so please forgive if I've missed any specifics.

I've never had any problems with the package management (either apt or synaptic) until now.

**At the time I was running debian 7 64 bit. Intel Core2Duo CPU. Graphics card is a GeForce GTX 750. modinfo nvidia reveals I have version 346.72 of nvidia's proprietary drivers.

My problem relates to the proprietary nvidia drivers I have installed:

The debian packages don't work with the nvidia's proprietary drivers which is fair enough. One of the things the installer for nvidia-cuda-toolkit does is to try to remove incompatible drivers by running their uninstall scripts. This step failed resulting in an incomplete installation. By failed I mean the uninstall script would hang indefinitely. I tried it several times, an initial prompt confirms the user wishes to uninstall, answering Yes causes everything to hang, answering No aborts the installation.

At this point I had serious troubles with the package management; apt kept complaining about the failed installation. Don't remember exactly what I did it but I was running commands like:
dpkg --configure -a
dpkg -i nvidia-cuda-toolkit
dpkg --get-selections | grep -v install

At this stage I was ready to give up and all I wanted was to get things back to a normal state. Eventually I found a tip which seemed to help:

Code: Select all

dpkg --get-selections | awk '{ if ($2=="install") print $1,"deinstall"}' | grep -vF "$(dpkg -l | awk '/^ii/ {print $2}')" | dpkg --set-selections
Not so sure about how it works but I get the gist of it is manipulating the status of dpkg. I really hate blindly typing commands into the console without fully understanding them. Running this seemed to get apt working - I could add/remove packages without a problem.

At this point I have managed to remove nvidia-cuda-toolkit from Synaptic's list of packages to install

Just one annoyance remains, whenever I install a package using Synaptic, I get a Debconf window asking me to run "nvidia-installer --uninstall". I'm 99% sure this is the script which hangs, so I uncheck the option and continue. At the end I always get errors which I ignore:

Code: Select all

ERROR: Please run 'nvidia-installer --uninstall' manually or delete it.
dpkg: error processing package nvidia-installer-cleanup (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 nvidia-installer-cleanup
Anyway, today I realised that dpkg --get-selections returned the following:
nvidia-installer-cleanup deinstall

Uninstalling it seems to have fixed the issue:
apt-get remove --purge nvidia-installer-cleanup

This whole thing has been an absolute nightmare, wasted so many hours, I nearly messed up my primary system, and I'm back at square one. I'm interested to hear about your experiences with failed installations.

__________________________________________________________________
**Since that time I have performed an upgrade to debian 8.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: trouble installing nvidia-cuda-toolkit

#2 Post by GarryRicketson »

It would be easier to read this "rant" if you got rid of all the big red letters.

Post Reply