LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-22-2014, 03:33 PM   #1
hongman
Member
 
Registered: Feb 2005
Location: UK
Distribution: Knoppix 3.7
Posts: 285

Rep: Reputation: 35
Tried and failed several times to install Nvidia drivers


Luckily timeshift restore saved me!

I've broken my system before trying this so this time round I left it alone, but now I need it for running oclhashcat. The error was

error while loading shared libraries: libnvidia-ml.so.1: cannot open shared object file: No such file or directory

This is why I am installing the nvidia version.

First, some information - if you need more please let me know.

uname -a
Code:
Linux lynx 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2 x86_64 GNU/Linux
lcspci | grep VGA
Code:
01:00.0 VGA compatible controller: NVIDIA Corporation G86 [GeForce 8400M GS] (rev a1)
Oook, I'll try to remember what I did and in what order...

Downloaded the latest driver from the nvidia website:
Tried to run it, was informed that I needed to stop X first.
CTRL-ALT F2, logged in as root and ran /etc/init.d/gdm3 stop
Ran installer
Warning about the gc compiler for the kernel did not match, they require 4.6 but I have 4.7. Chose to continue.
Failed, message: Unable to find the kernel source tree for the currently running kernel....see README.
Googled and saw several references about linux-headers, but I dont understand enough to trust them.
Found a guide which I thought installed the correct things. Turns out it installed what I understand to be the apt version of the driver, which is apparently different to the Nvidia proprietary driver.
Spent ages on a blinking cursor for X, eventually got it to work. Tried running oclhashcat again but same error.
As it had installed other nvidia packages I tried the installer again, which failed because 2 packages cannot run at the same time, please remove Debian packages.
Back to google, found an official Debian doc: https://wiki.debian.org/NvidiaGraphi...eezy-backports

Now I have been warned about adding sources randomly but as this was an official Debian article specifically for my card I trusted it.

After step 3 of

# aptitude install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')

It removed a crap load of stuff, at which point I restored.

SO

After all that and several hours...

How do I install these drivers!?!
 
Old 10-22-2014, 04:28 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Did you reboot to the new kernel & try to install?
 
Old 10-22-2014, 04:34 PM   #3
hongman
Member
 
Registered: Feb 2005
Location: UK
Distribution: Knoppix 3.7
Posts: 285

Original Poster
Rep: Reputation: 35
Sorry you're going to have to be more specific as I am thoroughly out of my depth here!

I rebooted a few times, but if Im honest I'm not sure when.

After the restore my system should be back to what it was prior to even downloading the driver (which I have re-downloaded).

So - where do I start!
 
Old 10-22-2014, 04:39 PM   #4
hongman
Member
 
Registered: Feb 2005
Location: UK
Distribution: Knoppix 3.7
Posts: 285

Original Poster
Rep: Reputation: 35
One thing I have established which will need to be resolved, not sure if the headers bit will solve this though.

The installer fails at first on the gcc version check expecting 4.6 but I have 4.7 installed.

I confirmed 4.6 exists on my system too - by doing which gcc-4.6

I then did cc=gcc-4.6 sh nvidia.run

A new error comes up:

The CC version check failed: could not compile "gcc-version-check.c". Please be sure you have the Linux distro's libc development package installed and "gcc4.6" is a valid C compiler name.

Even more out of my depth!
 
Old 10-22-2014, 04:44 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
seeing as one can have more that one version of gcc installed
i have many

did you RESET alternatives to the system DEFAULT
or rerun the script ( if you use one )
i use a script to set the version -- by editing the links

or

did uninstall gcc 4.6 and install 4.7 ?
if so reinstall 4.6
 
Old 10-22-2014, 04:47 PM   #6
hongman
Member
 
Registered: Feb 2005
Location: UK
Distribution: Knoppix 3.7
Posts: 285

Original Poster
Rep: Reputation: 35
If I do gcc -v I get

gcc version 4.7.2 (Debian 4.7.2-5)

I did not install or uninstall anything.
 
Old 10-22-2014, 05:04 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you will NEED to actually LOOK
i have gcc 3.4 , 4.1,4.3,and 4.7and 4.8 installed
and if i were to run gcc -v it would only tell me that i have gcc 4.3 right NOW
( i was building some older code last night )
look in /usr/bin

for not just the link /usr/bin/gcc , but for /usr/bin/gcc-4.6 and 4.7
 
Old 10-22-2014, 05:36 PM   #8
hongman
Member
 
Registered: Feb 2005
Location: UK
Distribution: Knoppix 3.7
Posts: 285

Original Poster
Rep: Reputation: 35
Does this help?

find gcc*
gcc
gcc-4.6
gcc-4.7
gcc-ar
gcc-ar-4.7
gcc-nm
gcc-nm-4.7
gcc-ranlib
gcc-ranlib-4.7
 
Old 10-22-2014, 06:23 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you will need to check the links
i am betting that gcc points to gcc-4.7

also there are a few other parts of gcc under slightly different names
cpp
cc
c++
g++
gcov
gfortran
and a few other depending on what is installed
 
Old 10-22-2014, 07:31 PM   #10
hongman
Member
 
Registered: Feb 2005
Location: UK
Distribution: Knoppix 3.7
Posts: 285

Original Poster
Rep: Reputation: 35
Sorry, what commands do I need to run to get you the information you need?
 
Old 10-22-2014, 08:03 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
your two eyes
 
Old 10-22-2014, 08:14 PM   #12
hongman
Member
 
Registered: Feb 2005
Location: UK
Distribution: Knoppix 3.7
Posts: 285

Original Poster
Rep: Reputation: 35
Nope I am reading and re-reading what you wrote but I cant see what you mean?
 
Old 10-22-2014, 08:27 PM   #13
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
https://help.ubuntu.com/community/Bi...erHowto/Nvidia

you have to have the SAME version of gcc that the kernel is built with
the system default
the nvidia binary blob checks it

uninstall gcc 4.7 and install 4.6
also MAKE 100% sure that you have the kernel source installed
-- FOR THE KERNEL you are using ---


but

why are you not using your package manager and installing the ALREADY made kernel modual for your os

the nvidia.deb in your package manager will do all the work for you

AND
you will NOT have to manually REINSTALL it every time you update the kernel and xorg
 
Old 10-23-2014, 11:42 PM   #14
hongman
Member
 
Registered: Feb 2005
Location: UK
Distribution: Knoppix 3.7
Posts: 285

Original Poster
Rep: Reputation: 35
Saw this a bit late but actually managed to kind of suss it out in the end, I think what I did is a very similar thing to what you were getting at.

As I had both 4.6 and 4.7 of gcc and g++ installed I did (for others who may need this)

update-alternatives --config gcc and the same with g++
set to 4.6
and that was that!

God I spent so long on this and evetually accomplished what I set out to do in the first place which was to use ochashcat / cpyrit, but fruitless in the end!

After about 2 mins of running my gpu gets so hot it aborts it haha.

Oh well, learnt some things.

Actually I'm left with a slight bug with the display now, in that it doesnt seem to refresh some parts of the screen until I go back over it. For example I'm typing this and it will look like nothing is appearing, until I move the screen or highlight it or something. Seems random, not major. Perhaps when I can be bothered I will try the closed source drivers you linked.

Quick question however...the link you provided is for Ubuntu. While I know that debian/ubuntu are similar, I do know first hand that not everything is compatible. How does one tell, or is it a case of asking/trying?
 
Old 10-24-2014, 12:22 AM   #15
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
Quote:
Originally Posted by hongman View Post
Sorry you're going to have to be more specific as I am thoroughly out of my depth here!
Which begs the question why are you even attempting to install nvidia drivers? What benefit will you get from them that you do not already have?

Quote:
Originally Posted by hongman View Post
So - where do I start!
I find when learning something new taking your time and learning about what you already have is the best place to start. To many newbies install Linux and then think they must have this that or the next thing when in actual fact they don't and then they wreck their system before they even now how it works at a basic level.

I'm not trying to discourage you but I am trying to encourage you to take it slowly and learn about what you already have before you jump of the Tower of London and find there is no safety net under you. So now that I have said that I'll ask, as a way of reiterating what I have said, why are you attempting to install nvidia drivers? what benefit will you get from them that you do not already have?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Install nVidia Drivers without Failed to Initialize the NVIDIA GPU at PCI Error FreakofPurple Linux - Laptop and Netbook 1 08-29-2014 12:30 AM
nVidia drivers failed, how to restore to Nouveau? ziphem Linux - Software 4 05-21-2013 06:35 PM
Failed to install video drivers... Extraction failed! QueenZ Linux - Newbie 2 03-13-2009 08:55 AM
Failed to start the X server after installing Nvidia drivers... trancekid Linux - Newbie 10 09-27-2008 11:37 AM
newbie> nvidia drivers: failed to.. and x won't start mandrakemikael Linux - Software 10 08-31-2004 04:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration