I downloaded a .run file for a Nvidia driver, but when I run it in the terminal it tells me it must be run as root.
I’m a complete noob and I barely even know what root is. I think it’s somewhere around the equivalent of admin in windows.
Well, I got the file to run but it turns out that the driver will not recognize my card.
I’ve heard about other problems with Nvidia cards not working right with 64 bit versions of 12.04.
Radu Rădeanu
164k47 gold badges321 silver badges397 bronze badges
asked May 31, 2012 at 3:41
5
You need to do two things; both from a Terminal prompt:
- Change to the directory where you have the
.run
file stored. - Type:
chmod 755 filename.run
- Type:
sudo ./filename.run
The above commands will make the file executable and will launch the executable with root-level permissions.
muru
189k52 gold badges460 silver badges711 bronze badges
answered May 31, 2012 at 4:00
Justin AndruskJustin Andrusk
4,0262 gold badges19 silver badges19 bronze badges
2
Add the command «sudo» before the command. For example: sudo blah.sh
After you enter your password the command will run as root. Be careful to verify the trustworthiness of a package or command before running it with sudo.
answered May 31, 2012 at 3:59
3
root
is the master account in Ubuntu; every account has limited privileges but the root
account has no limitations. The reason for hiding root
is that in most cases you don’t need root access. The analog in Windows would be having to authenticate when you want to install a driver; in Ubuntu you have to be root or have root privileges.
There are two ways for you to get access as root. You can type:
sudo <whatever-command>
and Ubuntu will ask you for your password and then execute that command as root.
OR
sudo su
, where you’ll input your own password and then you will become root (i.e. you will be logged in as root).
I prefer the latter because it gives me more control; sometimes running a command just as root isn’t enough, but doing it this way can be more dangerous (i.e. you could accidentally cause more damage).
I recommend trying the first way. And then trying the second way if that doesn’t work. Just make sure you get out of root after you’re done (i.e. type exit
after you’re finished doing what you need to do as root).
answered May 31, 2012 at 4:03
5
If you have enabled the root account you can use
su
Enter the password for root, cd
to your application folder, then run
./package.run
Zanna♦
68.2k55 gold badges210 silver badges320 bronze badges
answered Feb 22, 2017 at 10:53
1
- Forum
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- General Help
- [ubuntu] Error: Must run as root
-
Error: Must run as root
I’m on Natty, and I attempted to install BatteryStatus via Terminal
This is the command I ran:
Code:
add-apt-repository ppa:iaz/battery-status
Yet it gives me the error:
Code:
Error: Must run as root
Please help me, I really wish to install BatteryStatus.
-
Re: Error: Must run as root
Use sudo.
Code:
sudo add-apt-repository ppa:iaz/battery-status
http://xkcd.com/293/
There are 10 kinds of people in this world: Those who understand ternary, those who don’t, and those who confuse it with binary.
-
Re: Error: Must run as root
Originally Posted by WorMzy
Use sudo.
Code:
sudo add-apt-repository ppa:iaz/battery-status
It gives back this when I run it
Code:
chrisv@chris:~$ sudo add-apt-repository ppa:iaz/battery-status [sudo] password for chrisv: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 28FED23C44FB7ED6EBEDEF6B90DCEB7B6E7F922F gpg: requesting key 6E7F922F from hkp server keyserver.ubuntu.com gpg: key 6E7F922F: "Launchpad PPA for Ivan Zorin" not changed gpg: Total number processed: 1 gpg: unchanged: 1 chrisv@chris:~$ ^C chrisv@chris:~$
-
Re: Error: Must run as root
You already have that PPA added as a software source. You can’t add it again.
http://xkcd.com/293/
There are 10 kinds of people in this world: Those who understand ternary, those who don’t, and those who confuse it with binary.
-
Re: Error: Must run as root
Originally Posted by WorMzy
You already have that PPA added as a software source. You can’t add it again.
So what I can do install this then?
I’ve checked my sources, but I’m still encountering issues when trying to install BatteryStatus.
-
Re: Error: Must run as root
What can you do to install what?
Code:
sudo apt-get update && sudo apt-get install <package name>
http://xkcd.com/293/
There are 10 kinds of people in this world: Those who understand ternary, those who don’t, and those who confuse it with binary.
Bookmarks
Bookmarks

Posting Permissions
Содержание
- Thread: nvidia-installer must be run as root
- nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Thread: nvidia-installer must be run as root
- nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- Re: nvidia-installer must be run as root
- How to run a .run file as root?
- 4 Answers 4
- Error must run as root ubuntu
- Error must run as root ubuntu
Thread: nvidia-installer must be run as root
Thread Tools
Display
nvidia-installer must be run as root
I am trying to load new Nvidia video drivers. I go to the root directory, run the command and it starts then I get this error message.
nvidia-installer must be run as root
I try to login as root with no success. What am I doing wrong?
Re: nvidia-installer must be run as root
Re: nvidia-installer must be run as root
the root account is disabled so you can’t log in as root. just take the command and put sudo in front of it
example sudo nvidia-installer.sh
it will then ask for your password, enter it and it should install and run
Debian Testing(64bit) + XFCE4 AM2 5200+ ATI Radeon HD4350, 4gig RAM,320Gig and 750gig HDs
what’s the difference between an answer and a solution? An answer is what they want to hear, a solution is what they don’t want to hear
Re: nvidia-installer must be run as root
Re: nvidia-installer must be run as root
ERROR: You appear to be running an X server; please exit X before
installing. For further details, please see the section INSTALLING
THE NVIDIA DRIVER in the README available on the Linux driver
download page at www.nvidia.com.
Re: nvidia-installer must be run as root
You don’t login as root from the login screen, silly goose.
Open up a terminal, (Applications > Accessories > Terminal) and type in
Also, you can do this in your home directory, no need to navigate to Root directory.
sudo means Super User DO, and gives you the privileges of root. That way, you can run any command, and make system wide changes. When you type in «sudo [command]» in the terminal, you will be prompted for a password. Type in the password for your account (i.e., the one you login with) and you will run it as root.
If you are going to be running many commands with sudo privileges, you can alternatively type in
«man» means Maunal, and it will explain to you what the command does. «man man» for more information on the manual pages.
Источник
Thread: nvidia-installer must be run as root
Thread Tools
Display
nvidia-installer must be run as root
i have an nvidia geforce 8600 gt and when i run it as a sudo it says that «sh: 0: Can’t open ./NVIDIA-Linux-x86-310.32».
and i try to run it as a program in terminal it says «ERROR: nvidia-installer must be run as root». what should i do?
Re: nvidia-installer must be run as root
Is there any reason you are downloading the driver from the Nvidia website? This should only be done as a last resort.
You should try using the driver from the Ubuntu repositories instead, if you can tell us what version of Ubuntu you are using we can give you specific instructions.
Re: nvidia-installer must be run as root
Are you trying to run a driver downloaded from the nVidia site? If so then unless you have good reason, can I suggest you install the driver provided by the Ubuntu repositories. That way you won’t end up with a black screen every time there is a security update to the kernel.
Open the Ubuntu software centre, choose Edit->Software Sources, and look in the Additional Drivers tab.
If you really want to install the nvidia one, put the word sudo in front of the command, to request admin rights. like this (but you will have to shut down the GUI and do it from a tty console):
Last edited by The Cog; March 3rd, 2013 at 10:03 PM .
Re: nvidia-installer must be run as root
First, you’ll want to exit X Server if you haven’t already.
Re: nvidia-installer must be run as root
Is there any reason you are downloading the driver from the Nvidia website? This should only be done as a last resort.
You should try using the driver from the Ubuntu repositories instead, if you can tell us what version of Ubuntu you are using we can give you specific instructions.
I’m having this same problem. I’m running Lucid LTS (10.04), and the device is a GT540M.
Any guidance you can offer will be greatly appreciated.
Re: nvidia-installer must be run as root
Check the Ubuntu Software Center for a current version of the Nvidia drivers. If you’re unable to locate one, try using the steps outlined above. You’ll need to stop X and install as root by using the commands outlined.
Re: nvidia-installer must be run as root
Search for «NVidia binary X.Org driver (‘current’ driver)» in the Ubuntu Software Center.
Re: nvidia-installer must be run as root
I’m having this same problem. I’m running Lucid LTS (10.04), and the device is a GT540M.
Any guidance you can offer will be greatly appreciated.
You should be using a newer version of Ubuntu with newer hardware such as yours, especially if you are new to Linux. If you install 12.04 or 12.10 your graphics card will work using the repository driver like we advised the original poster. Ubuntu 10.04 only has a couple of months of desktop support left anyway.
If there’s a specific reason you need 10.04 on that hardware, you can try installing the driver from the Nvidia website, but you need to switch off the X server temporarily.
Then use the terminal to run the Nvidia driver installer. You’ll need to do this after every kernel update.
Don’t know how to use the terminal? Save yourself a lot of hassle, just upgrade your Ubuntu to 12.04 or 12.10 and use the instructions given to the person who originally posted in the thread.
Источник
How to run a .run file as root?
I downloaded a .run file for a Nvidia driver, but when I run it in the terminal it tells me it must be run as root.
I’m a complete noob and I barely even know what root is. I think it’s somewhere around the equivalent of admin in windows.
Well, I got the file to run but it turns out that the driver will not recognize my card. I’ve heard about other problems with Nvidia cards not working right with 64 bit versions of 12.04.
4 Answers 4
You need to do two things; both from a Terminal prompt:
- Change to the directory where you have the .run file stored.
- Type: chmod 755 filename.run
- Type: sudo ./filename.run
The above commands will make the file executable and will launch the executable with root-level permissions.
Add the command «sudo» before the command. For example: sudo blah.sh
After you enter your password the command will run as root. Be careful to verify the trustworthiness of a package or command before running it with sudo.
root is the master account in Ubuntu; every account has limited privileges but the root account has no limitations. The reason for hiding root is that in most cases you don’t need root access. The analog in Windows would be having to authenticate when you want to install a driver; in Ubuntu you have to be root or have root privileges.
There are two ways for you to get access as root. You can type:
sudo and Ubuntu will ask you for your password and then execute that command as root.
Источник
Error must run as root ubuntu
Необязательно. Можно так:
1. CTRL-ALT-F1
2. логин на tty1 под рутом
3. /etc/inti.d xdm stop
4. установка драйверов, настройка иксов
5. /etc/init.d/xdm start
Цитата |
---|
Олег Цыбин пишет: Как наладить обмен файлами с Windows и возможно это или нет? |
Возможно. Пакет Samba.
Цитата |
---|
Олег Цыбин пишет: хотел бы изучить Linux RedHat но не могу негде наитии путевого руководства помогите кто чем может plzzzzzzzzz |
Есть книги. Актуальную на сегодняшний день бумажную документацию RH, к сожалению, подсказать не могу.
Цитата |
---|
Олег Цыбин пишет: что то я немогу найти как устанавливать драйвера |
Большая часть драйверов уже присутствует в ядре Linux. Проприетарный драйвер от нвидии устанавливается путем скачивания с официального сайта и запуска универсального установщика ./NVIDIA-Linux-x86-1.0-6629-pkg1.run. Есть и более удобные методы установки, чем искать сайт вендора, проверять появились ли драйвера, скачивать их и затем устанавливать — из репозитария пакетов одной командой . В разных дистрибутивах — разные репозитарии и разные пакетные менеджеры: «emerge nvidia-drivers», «yum install kmod-nvidia» и т.д.
Источник
Error must run as root ubuntu
Необязательно. Можно так:
1. CTRL-ALT-F1
2. логин на tty1 под рутом
3. /etc/inti.d xdm stop
4. установка драйверов, настройка иксов
5. /etc/init.d/xdm start
Цитата |
---|
Олег Цыбин пишет: Как наладить обмен файлами с Windows и возможно это или нет? |
Возможно. Пакет Samba.
Цитата |
---|
Олег Цыбин пишет: хотел бы изучить Linux RedHat но не могу негде наитии путевого руководства помогите кто чем может plzzzzzzzzz |
Есть книги. Актуальную на сегодняшний день бумажную документацию RH, к сожалению, подсказать не могу.
Цитата |
---|
Олег Цыбин пишет: что то я немогу найти как устанавливать драйвера |
Большая часть драйверов уже присутствует в ядре Linux. Проприетарный драйвер от нвидии устанавливается путем скачивания с официального сайта и запуска универсального установщика ./NVIDIA-Linux-x86-1.0-6629-pkg1.run. Есть и более удобные методы установки, чем искать сайт вендора, проверять появились ли драйвера, скачивать их и затем устанавливать — из репозитария пакетов одной командой . В разных дистрибутивах — разные репозитарии и разные пакетные менеджеры: «emerge nvidia-drivers», «yum install kmod-nvidia» и т.д.
Источник
-
bertenvdb
- Posts: 6
- Joined: 2015-01-21 15:25
- Location: Belgium
Must run as root, but I am already root
#1
Post
by bertenvdb » 2015-01-21 16:29
Hi,
I’m trying to install OpenNMS. I need to execute:
Code: Select all
sudo $OPENNMS_HOME/bin/install -dis
But wether I do the above using sudo or logged as root, I get:
Code: Select all
Error: you must run this script as root, not 'UID=0(root'
I just did a fresh install, and I remember not getting sudo adduser to work. I then used visudo and did this:
Code: Select all
# User privilege specification
root ALL=(ALL:ALL) ALL
berten ALL=(ALL:ALL) ALL
uname -a: Linux kira 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u1 x86_64 GNU/Linux
-
bertenvdb
- Posts: 6
- Joined: 2015-01-21 15:25
- Location: Belgium
Re: Must run as root, but I am already root
#3
Post
by bertenvdb » 2015-01-21 17:09
Code: Select all
berten@kira:/usr/share/opennms$ sudo $OPENNMS_HOME/bin/install -dis
Error: you must run this script as root, not 'UID=0(root'
berten@kira:/usr/share/opennms$ su root
Wachtwoord:
root@kira:/usr/share/opennms# $OPENNMS_HOME/bin/install -dis
Error: you must run this script as root, not 'UID=0(root'
-
schnuller
- Posts: 386
- Joined: 2014-11-25 05:05
Re: Must run as root, but I am already root
#8
Post
by schnuller » 2015-01-21 21:35
Perhaps try
su —
too. Which usually should be done, i was told, but as i get away without doing it …
Looking at the error message i doubt that is the problem. I would do what was proposed above (ask the devs and/or look at the code, how it checks for user id).
-
bertenvdb
- Posts: 6
- Joined: 2015-01-21 15:25
- Location: Belgium
Re: Must run as root, but I am already root
#9
Post
by bertenvdb » 2015-01-22 01:25
schnuller wrote:
Perhaps try su —
I tried this, but no dice.
roseway wrote:Have you tried examining the script? Search for the error message and see what triggers it. It’s probably just a bug in the script, and you could edit it to bypass the root check.
I commented out the if…fi that checks for the user and the complete script executed without any errrors.
Running opennms itself gave the same error, same workaround also works. Everything seems to run as it should.
Will post a topic on OpenNMS as soon as I wake up in the morning.
Thanks for the support !
For reference or curious people:
Code: Select all
#!/bin/sh -
OPENNMS_HOME="/usr/share/opennms"
OPENNMS_BINDIR="/usr/share/opennms/bin"
RUNAS="root"
ULIMIT=`which ulimit 2>/dev/null`
if [ -n $ULIMIT ]; then
for SIZE in 1024 2048 4096 8192 unlimited; do
ulimit -n "$SIZE" >/dev/null 2>&1
if [ $? -gt 0 ]; then
break
fi
done
fi
myuser="`id | sed -e 's/uid=[0-9][0-9]*(//' -e 's/).*//'`"
#if [ x"$myuser" = x"$RUNAS" ]; then
# true # all is well
#else
# echo "Error: you must run this script as $RUNAS, not '$myuser'" >&2
# exit 4 # According to LSB: 4 - user had insufficient privileges
#fi
if [ -f "$OPENNMS_HOME/etc/opennms.conf" ]; then
. "$OPENNMS_HOME/etc/opennms.conf"
fi
exec "$OPENNMS_BINDIR"/runjava -r --
$ADDITIONAL_MANAGER_OPTIONS
-Dopennms.home="$OPENNMS_HOME"
-Dlog4j.configurationFile="$OPENNMS_HOME"/etc/log4j2-tools.xml
-cp "$OPENNMS_HOME/lib/opennms_bootstrap.jar"
org.opennms.bootstrap.InstallerBootstrap
"$@"
-
fsmithred
- Posts: 1873
- Joined: 2008-01-02 14:52
Re: Must run as root, but I am already root
#10
Post
by fsmithred » 2015-01-22 13:23
That’s weird. It looks like it should work. It does work on command line, and it does work if I put just that test in a script by itself. Is there something odd about the output of the id command? You could add
right before the test to see if the variable is being created correctly. It should print «myuser=xrootx»
FWIW, here’s another way to do the same test:
Code: Select all
# Check that user is root.
[[ $(id -u) -eq 0 ]] || { echo -e "nt You need to be root!n" ; exit 1 ; }
-
impensj
- Posts: 1
- Joined: 2016-07-05 16:58
Re: Must run as root, but I am already root
#11
Post
by impensj » 2016-07-05 17:24
The script expects the `id` command to return a line containing uid= but gets a line containing UID= instead.
Changing uid to UID in the script makes the script itself run without error. The script /usr/share/opennms/bin/opennms has a similar issue.
- Сообщения: 452
- Зарегистрирован: 17 сен 2009, 06:29
- Пол: мужской
- Благодарил (а): 6 раз
- Поблагодарили: 11 раз
Ubuntu 8.04 TLS — драйвер NVIDIA
#1
Непрочитанное сообщение DN2010 » 25 сен 2009, 16:27
Подскажите, кто знает, где можно почитать описание на русском языке установленных/предалагаемых пакетов для Убунту 8.04. Может у кого-то книжка какая есть, или сохраненные ссылки? Спасибо.
Нашел на сайте нвидиа соответствующий драйвер (GF 5700LE), но он в формате *.run, устанавливаться не желает. Инструкция с сайта по запуску из терминала «sh NVIDIA-…» тоже не помогает. Установка/Удаление предлагает три варианта драйвера, но после активации система грузится в черный экран.
-
g-z0mb1e
- Сообщения: 743
- Зарегистрирован: 14 авг 2009, 20:01
- Благодарил (а): 19 раз
- Поблагодарили: 20 раз
Re: Пакеты Ubuntu 8.04 TLS
#2
Непрочитанное сообщение g-z0mb1e » 25 сен 2009, 17:07
всмысле? у тебя нерусифицированная убунта чтоле или что? описание можно читать в synaptic, при установке.
В действительности все не так, как на самом деле.
-
g-z0mb1e
- Сообщения: 743
- Зарегистрирован: 14 авг 2009, 20:01
- Благодарил (а): 19 раз
- Поблагодарили: 20 раз
Re: Пакеты Ubuntu 8.04 TLS
#4
Непрочитанное сообщение g-z0mb1e » 25 сен 2009, 18:18
описание пакетов никогда не было и не будет на русском языке. кроме некоторых. если уж совсем сложно разобраться, пробуйте через «приложения» -> «установка/удаление приложений.» там все по категориям расфасовано, с иконками и поиском и описанием.
В действительности все не так, как на самом деле.
-
DN2010
Автор темы - Сообщения: 452
- Зарегистрирован: 17 сен 2009, 06:29
- Пол: мужской
- Благодарил (а): 6 раз
- Поблагодарили: 11 раз
Re: Пакеты Ubuntu 8.04 TLS
#5
Непрочитанное сообщение DN2010 » 25 сен 2009, 18:30
«описание пакетов никогда не было и не будет на русском языке.»
Хотелось бы верить, что рано или поздно найдется человек, который не поленится сделать перевод:))) Ну что же, будем читать книги.
-
DN2010
Автор темы - Сообщения: 452
- Зарегистрирован: 17 сен 2009, 06:29
- Пол: мужской
- Благодарил (а): 6 раз
- Поблагодарили: 11 раз
Re: Ubuntu 8.04 TLS — драйвер NVIDIA
#6
Непрочитанное сообщение DN2010 » 26 сен 2009, 17:07
Запускаю файл NVIDIA-Linux-x86-173.14.20-pkg1.run в терминале, пишет:
ERROR: nvidia-installer must be run as root
Снимаю галочку автоматического входа, ввожу при входе имя «root», а пароль какой? Я вроде пароля для рута вообще не создавал при установке, и никто не просил:) Пароль root не проходит, для рабочей учетной записи — тоже.
Добавлено спустя 26 минут 16 секунд:
Создал пароль root ($sudo passwd root в терминале суперпользователя), но залогиниться с ним не могу, пишет:
Администратору не разрешено входить в систему с этого экрана.
-
DN2010
Автор темы - Сообщения: 452
- Зарегистрирован: 17 сен 2009, 06:29
- Пол: мужской
- Благодарил (а): 6 раз
- Поблагодарили: 11 раз
Re: Ubuntu 8.04 TLS — драйвер NVIDIA
#8
Непрочитанное сообщение DN2010 » 26 сен 2009, 19:14
Не подходит, тем более, что там не так все просто. Настроил окно входа, захожу как root, теперь надо каким-то образом отключить Х-сервер. Если через ctrl+alt+backspace, выкидывает в то же окно логина, а если ctrl+alt+F1, то в текстовик, а что там набирать хз.
-
g-z0mb1e
- Сообщения: 743
- Зарегистрирован: 14 авг 2009, 20:01
- Благодарил (а): 19 раз
- Поблагодарили: 20 раз
Re: Ubuntu 8.04 TLS — драйвер NVIDIA
#9
Непрочитанное сообщение g-z0mb1e » 26 сен 2009, 19:22
вы слишком много мудрите. файл драйвера видеокарты запускать нужно было через sudo и все. в ubuntu root пользователь по-дефолту отключен. зачем такие костыли, если можно все сделать намного проще ?
В действительности все не так, как на самом деле.
-
DN2010
Автор темы - Сообщения: 452
- Зарегистрирован: 17 сен 2009, 06:29
- Пол: мужской
- Благодарил (а): 6 раз
- Поблагодарили: 11 раз
Re: Ubuntu 8.04 TLS — драйвер NVIDIA
#10
Непрочитанное сообщение DN2010 » 26 сен 2009, 19:25
Да делал я через sudo, и даже путь прописывал, все равно, требет rootа. Это я сразу пытался по простому вопрос решить.
-
g-z0mb1e
- Сообщения: 743
- Зарегистрирован: 14 авг 2009, 20:01
- Благодарил (а): 19 раз
- Поблагодарили: 20 раз
Re: Ubuntu 8.04 TLS — драйвер NVIDIA
#11
Непрочитанное сообщение g-z0mb1e » 26 сен 2009, 19:37
не может такого быть, потому что sudo — это и есть запуск от прав root’a. давайте сюда вывод того, чего вводите и что вам выводит.
В действительности все не так, как на самом деле.
-
MACTEP
- Не верь в Худо
- Сообщения: 6265
- Зарегистрирован: 10 янв 2007, 01:19
- Пол: мужской
- Благодарил (а): 238 раз
- Поблагодарили: 403 раза
- Контактная информация:
Re: Ubuntu 8.04 TLS — драйвер NVIDIA
#15
Непрочитанное сообщение MACTEP » 26 сен 2009, 21:18
а разве в репах ubuntu нет проприетарного драйвера на NV? зачем париться с файлом .run, если можно сделать sudo apt-get install nvidia-glx nvidia-glx-new?
существует так же Envy, сама выбирает и ставит нужный драйвер.
Ubuntu — это линукс для домохозяек, все телодвижения с файлами .run там просто лишние.
«…а кто там и за что на сколько присядет потом,- так Родина нам такая досталась, суровая, но душевная.» (с) Conqwest