0

I'm fairly new to Ubuntu, and I'm trying to get it working on a computer of mine. It's an older PC that I've had windows 7 on. Currently, when I boot to the desktop, within a few moments, the screen shows nothing but small horizontal bars everywhere. Using graphic failsafe mode is the only way I can do anything within it at the moment. So I'm trying to install the appropriate NVIDIA driver downloaded from their site, which is a .run file.

I got a few errors at first concerning the x server running, but was able to overcome them by using Cntl + ALt + F1, sudo service lightdm stop

Now, when I try:

$ sudo ./NVIDIA.run --kernel-source-path=/usr/src/linux-headers-3.16.0-33
ERROR: Neither the '/usr/src/linux-headers-3.16.0-33/include/linux/version.h' nor the '/usr/src/linux-headers-3.16.0-33/include/generated/uapi/linux/version.h' kernel header file exists.  
The most likely reason for this is that the kernel source files in '/usr/src/linux-headers-3.16.0-33' have not been configured.

I used tab when typing the path so that it would complete it for me.

Here's the full log:

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Mon Mar 30 21:38:44 2015
installer version: 304.125

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

nvidia-installer command line:
    ./nvidia-installer
    --kernel-source-path=/usr/src/linux-headers-3.16.0-33

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 304.125.
-> Running distribution scripts
   executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed!  Continue installation anyway?     (Answer: Yes)
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Using the kernel source path '/usr/src/linux-headers-3.16.0-33' as specified by the '--    kernel-source-path' commandline option.
ERROR: Neither the '/usr/src/linux-headers-3.16.0-33/include/linux/version.h' nor the     '/usr/src/linux-headers-3.16.0-33/include/generated/uapi/linux/version.h' kernel header file     exists.  The most likely reason for this is that the kernel source files in '/usr/src/linux- headers-3.16.0-33' have not been configured.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for   details.  You may find suggestions on fixing installation problems in the README available on  the Linux driver download page at www.nvidia.com.
muru
  • 197,895
  • 55
  • 485
  • 740

2 Answers2

0

I would put this as a comment but my rep isn't high enough at the moment so I will post this as an answer/workaround that may help...

EDIT: first purge any nvidia drivers that may have been attempted by running the following command before trying the below workaround:

sudo apt-get remove --purge nvidia-*

Rather than attempting to install from the .run file what you can do is go into command line and type the following. Keep in mind that it may get you a lower version of the nvidia driver but it will still install a proprietary nvidia driver regardless.

sudo apt-get install nvidia-current

I had a major problem with the .run file at first myself when I came back to Ubuntu after so many years away from it (tried different distros in the meantime) and that appeared to work quite well for me. Good luck, and please report back with results.

0

IF you are still interested in installing the driver you got from the site you may be able to do it using sh . this process is somewhat error susceptible so do it carefully. Check this for guidance. In short, what you need to do is:

  1. Give your nvidia-file permission to run. Assuming it is NVIDIA-Linux-x86_64-346.59.run: chmod 777 NVIDIA-Linux-x86_64-346.59.run
  2. Now you'll need to go tty1, for example, just press CTRL+ALT+F1
  3. Navigate to the folder where the file is and run it as sudo: sudo ./NVIDIA-Linux-x86_64-346.59 From now on you need to be careful and follow every instruction. Since you seam to have only one graphic card you can let the installer automaticly configure your xorg file.

BUT AS I SAID check the link i mentioned earlier for help.

Now about keeping it updated... Since NVidia does not supply any ppa or other system to update drivers I THINK you will need to go check it for yourself but go here and try to find some info about your driver.

Hope it helps.