How to Install Nvidia Driver NVIDIA-Linux-x86-270.41.19.run
Hi All.
as you should know (from where im posting this) that im an Absolute noob at Ubuntu (ive been using Windows a Lot and wanted to see how hard it would be to include Ubuntu in my App / Game Dev) now onto the question. ive downloaded the Nvidia Drivers from there site and followed a Tutorial on how to install it, But i run into this error: ERROR: nvidia-installer must be run as root what should i do ? where is this "root" and forgive me if this has been asked, but i could not find a question / article / tutorial that got me past this error. so Many Thanks in Advance. :):):) |
Since you are a newbie I would strongly recommend to install the driver from Ubuntu's repositories. You can use Ubuntu's driver installer for that. If you use the driver from the website you can run into serious troubles when updating the system.
To your question, in Ubuntu the root is user is disabled by default. If you want to execute a command as root user you have to put the command sudo in front of it, like this Code:
sudo <Your-Command-Here> |
Hi
"root" is the most privileged account available on your system. It is the "super user" the user who can do "anything" - delete any file, read any file, and execute any system maintenance task. The Nvidia installer needs to be run "as root" because it needs to change and modify aspects of the system that, because they are critical to system operation, are only accessible to the root user - e. g. the most powerful user. I've found that the best way to install the Nvidia "run" files for updating my Nvidia graphics driver is the following. I'm using Fedora, but the basics should remain the same for your distro. (Make sure you save .run file in your home folder, so you know where to get hold of it WITHOUT having the GUI (graphics mode) active.) VERY IMPORTANT Make SURE you have your kernel source available!!! I'm not sure how you do this under Ubuntu, or where you get a hold of it, but you MUST have a "kernel-devel" pacakge installed that is for the kernel you are currently running! If you do NOT have this, you might have trouble installing the new Nvidia driver, or you might not be able to do an upgrade at all since the driver NEEDS your current kernel source to be available to compile against - if you're going to do this by hand, which is what I'm describing here...) 1. Open a terminal Usually, if you're on the desktop of your system, there is a way to "open a terminal". What this means is that you need to find the icon of a terminal emulator program, like xterm or Konsole. These are usually to be found under "utilities" or "system tools". Look in your installation's menu and click on the relevant icon for the relevant terminal emulator. 2. You should now get a display or screen where you can type commands. The first thing to do is to type Code:
su 3. Once you've typed in the password you should get a new prompt that has a "#" at the end. On my system, when I'm root, it looks like this: Code:
[root@stefanlinux ~]# Code:
[stefan@stefanlinux php]$ 4. What you now need to do is switch your system out of "GUI" mode to text mode, so that, in text mode, you can install the NVidia driver. To do this, at the # prompt you now have, type Code:
vi /etc/inittab 5. BE CAREFUL: What you are now going to do is sensitive and if you make a mistake you can potentially make your Linux install completely unusable. 6. You should see something similar to this: Code:
# inittab is only used by upstart for the default runlevel. Code:
id:5:initdefault 9. Place the cursor on the "5" in the line Code:
id:5:initdefault Code:
id:3:initdefault Code:
:wq! 11. What you've now done is change the runlevel of your system for the next boot. E. g. if you now reboot, you WON'T just go to the graphical desktop you now have, you'll go to TEXT MODE. That is what "id:3:initdefault" means - it means "start up in text mode, with no GUI active." 12. Now, reboot your system. Since you're root, at the "#" prompt, you should be able to just type "reboot": Code:
[root@stefanlinux ~]# reboot 14. Log in as root at the prompt. E. g. type "root" at the prompt, then the root password (e. g. the same one you used when typing "su" just now. 15. At the # prompt (See? it is the same one you saw when you typed "su" just a few moments ago, inside your terminal emulator) go to your home directory, where you saved the .run file (see the start of the reply above.) E. g., on my system, to get to my home folder I'd do: Quote:
Code:
chmod a+x NVIDIA-Linux-x86-270.41.06.run 17. Once you've done the above, type the name of the .run file and press enter. This will start up the Nvidia installer itself. 18. Follow the onscreen prompts. The installer will check for an existing "kernel interface" for your kernel, if it finds one, great. If not, follow the prompts and allow it to compile a new kernel interface against your kernel. This is where the kernel source referred to above comes in - if it is in a standard location (as your kernel-source package hopefully installs, it should be) the installer will find it, but you might need to type the full path to the source if it cannot - I've got no idea where Ubuntu puts kernel sources if installed via the Ubuntu package management facilities). 19. Once the procedure is complete, the installer should report success. 20. Once you're back in the text terminal, again edit the /etc/inittab file as detailed above. Only now, change the "3" in the line Code:
id:3:initdefault back to a 5, like so: Code:
id:5:initdefault 21. Again type reboot. You've now switched back from "boot into text mode" (3) to "boot into GUI mode" (5). 22. Hopefully, when your system now starts up, it will be in GUI mode with the new Nvidia driver active... |
@rylan76
ok, will try that. oh, i should have mentioned that i have downloaded and installed Ubuntu 11.X through the wubi under windows XP. i also looked at the Additional Drivers Window, but it wanted to download the drivers and i dont have a fast internet connection spped (192BKs) |
@rylan76: Your HowTo will not work on Ubuntu for several reasons.
To your points: 2. Will not work, Ubuntu has not an activated root account by default. 4.-12. Will not work, Ubuntu is (like the most Debian based distros) using runlevel 2 by default. If you want to stop X from starting you have to do that by disabling the display-manager' startup. The rest of your HowTo is for that reasons not really applicable. As I said before, for a newbie I recommend strongly to let the driver installer install the drivers, or you will run into serious problems when the kernel or X is updated. |
@ryan20fun
In Ubuntu, there is not a specific account as "root" but you can run command as a root(i mean, having the same permissions as root ) by prefixing "sudo" followed by your command i.e Quote:
Or else,you can run all commands as a root.In order to login as a root you can use Quote:
Then make that nvidia binary executible which you have downloaded from the nvidia site. This can be done by running Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
because i tried the home folder and desktop but it keeps saying that no such command exits. and i tried draging the run file to the console window but the best i can get it to do is have the same error as what i posted in my first post. is there a simple script or something i can run that will install the drivers ? |
There is no restriction of using any directory unless you have permission of that particular directory to access especially /root directory.
If you downloaded NVIDIA-Linux-x86-270.41.06.run under desktop directory then you can use Quote:
Quote:
http://www.webupd8.org/2010/06/how-t...5-display.html The above link explains about installing nvidia-driver in Ubuntu only.Try out if it works |
what directory should i put the drivers under ?
YOU DO NOT the installer will put it where it belongs BUT I WOULD RECOMMEND using the driver in the ubuntu repo for the .run you MUST reinstall it for EVERY AND ALL kernel ,X11,and mesa updates basicaly for EVERY major update you will have to reinstall BUT HERE IS THE KIKER your system will boot ONLY into TEXT ONLY there will be NO GUI TO USE TO REINSTALL THE .run |
nope, not working
this is what i did: administrator@ubuntu:~$ cd /home/administrator/desktop bash: cd: /home/administrator/desktop: No such file or directory administrator@ubuntu:~$ sudo su [sudo] password for administrator: root@ubuntu:/home/administrator# NVIDIA-Linux-x86-270.41.19.run NVIDIA-Linux-x86-270.41.19.run: command not found root@ubuntu:/home/administrator# sudo NVIDIA-Linux-x86-270.41.19.run sudo: NVIDIA-Linux-x86-270.41.19.run: command not found root@ubuntu:/home/administrator# chmod +x NVIDIA-Linux-x86-270.41.19.run root@ubuntu:/home/administrator# sudo su NVIDIA-Linux-x86-270.41.06.run Unknown id: NVIDIA-Linux-x86-270.41.06.run root@ubuntu:/home/administrator# so what am i doing wrong ? ---edit--- i take it that in the additional drivers window: when i click the activate button it will download and install the driver ? if so, i could just leave my PC overnight to do that. |
Quote:
Kind regards |
nope still not working, do i have to do anything special to get it to install ?
because ive tried all sorts of stuff in the terminal window and the best i can get is ERROR: nvidia-installer must be run as root and that is from the nvidia .run file |
Quote:
Code:
cd /home/administrator/Desktop |
for the .run if you REALLY want to use it
copy it to / that way it is easy to find ( you need to be root to copy it there ) when you dl'ed it in ff it automatically dl'ed it to Downloads - in your home folder Code:
su Code:
cd / then repeat EVERY TIME you have a kernel update but there will be NO gui to use only the text only terminal |
@ryan20fun
Did you follow the link of webupd8? I think it configure my nvidia card on other PC.Most of the Ubuntu user installed the driver for their nvidia card through third-party repo instead of downloading from nvidia official site and the configure. And after installationfrom their respective repo,you need to activate this additional driver in System->Preference/Administration(I'm not remembering exactly) after a reboot In Ubuntu there is no point in running "telinit" as Ubuntu doesn't have "/etc/inittab" file.So fix runlevel |
All times are GMT -5. The time now is 05:07 PM. |