Install linux permission denied

Permission denied while running make install

I am trying to install gtk-server. First I typed the command ./configure and then make , but when I typed command make install it gave me this error:

osama@osama-HP-Compaq-6910p:~/Downloads/gtk-server-2.3.1-sr$ make install /usr/bin/install: cannot create regular file `/usr/local/bin/gtk-server': Permission denied mkdir -p /usr/local/bin /usr/bin/install -c gtk-server /usr/local/bin /usr/bin/install -c stop-gtk-server /usr/local/bin /usr/bin/install: cannot create regular file `/usr/local/bin/stop-gtk-server': Permission denied make: *** [install] Error 1 

1 Answer 1

If you are installing an application and used ./configure without the —prefix= option the make install process will install the compiled files in to the predefined paths in your system’s file system.

Because you are installing to your system’s file system you need special permissions for writing the files, try:

This will elevate your user’s permission to root and allow the compiled files to be installed in directories that your user does not have permissions to do so.

You can clearly see that the issue is a permission problem by the error message (cannot create regular file cannot create regular file /usr/local/bin/gtk-server and /usr/local/bin/stop-gtk-server ): the user that is trying to install these (in this case you) does not have permissions to write on those directories.

Источник

bash: ./install.sh: Permission denied installing intel fortran 2011

I am trying to install Intel Fortran Composer 2011. When I try to command ./install.sh it gives an error:

bash: ./install.sh: Permission denied 
  1. Tried; sudo ./install.sh sudo: ./install.sh: command not found
  2. Trying to remount the installation disk with exec permission; mount /media/user/IFORTRAN2011 -o remount,exec
  3. Trying to change install.sh to executable; chmod +x ./install.sh
  4. Tried; su -c ‘install.sh’
bash: install.sh: command not found 
Password: su: Authentication failure 

and I am sure the password is true. (If it is the same with my user password)

5 . I copied the disk into a folder than compressed it into

then tried everthing again. No luck.

After I did chmod +x ./install.sh when I look the permissions with: ls -l ./install.sh it still gives: -rw——- 1 user user 14758 Oct 7 2010 ./install.sh

4 Answers 4

There is many way to execute your script :

  • launch bash with root privilege sudo bash install.sh
  • change permissions to launch the script. However be careful, it’s an installation script, it may require root privileges. So you must probably run it as root. chmod +x install.sh or chmod 755 install.sh
  1. Right click on the something.sh file and click to properties
  2. Then click on permissions and change all access to «read and write»
  3. Then click on «allow executing file as program» (if not selected!)
  4. Close the window.
  5. Open terminal at the location of file and write:
Читайте также:  Hp mfp m132a драйвер linux

You have to specify the path — like mine is:

sudo /home/humayun/Downloads/xdk_web_linux64/install.sh 

and it works for me. When I was typing:

it was giving me error: No Such file or directory . So giving the correct location is important.

just go and right click on the file, choose properties, go to the Permissions, and check the Execute: Allow executing file as program.

You must log in to answer this question.

Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.13.43531

Ubuntu and the circle of friends logo are trade marks of Canonical Limited and are used under licence.

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Permission denied, are you root?

Use sudo to run a command with root privileges, like this:

@Suisse you’re not using bash which is pretty uncommon so the first question is why, secondly you might want to try simply typing /bin/bash to get into bash

I am using the terminal of a docker image. from the docker dashboard. by doing /bin/bash I got into bash (different colors and highlighting) but I still get the error: E: Could not open lock file /var/lib/dpkg/lock-frontend — open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

@Suisse if you’re using Docker it’s a Docker question more than an Ubuntu question. It may depend on your container but likely you can specify that you want to be root when you enter the container, like docker exec -u root -it /bin/bash

Читайте также:  Драйвер ядра virtualbox linux vboxdrv установить

sudo: Executing Commands with Elevated Privileges

  1. Most of the following commands will need to be prefaced with the sudo command. This elevates privileges to the root-user administrative level temporarily, which is necessary when working with directories or files not owned by your user account. When using sudo you will be prompted for your password. Only users with sudo (administrative) privileges will be able to use this command. You should never use normal sudo to start graphical applications as Root (Please see RootSudo for more information on using sudo correctly.)

So, because apt-get installs software and thus affects the system, you need to use the sudo command to give yourself administrator privilages.

Thus, you command should be sudo apt-get install myunity

If you want to update your system, run

sudo apt-get update sudo apt-get dist-upgrade 

This will update your system’s package database and then install any upgrades.

This does’t help in getting rid of the error: unable to lock the administration directory (/var/lib/dpkg/), are you root?

This one worked for me. You shouldn’t run both commands in one line as it was giving me same above error. I ran it separately and it’s doing something. Let’s see how it goes.

Before running any administrative task: installing, removing, changing system wide preferences, etc. you need to be root . This is specially true for apt-get . The message itself tells you where the problem is:

If you are not root , the install command will not work at all.

The way to fix this is using sudo before the command:

➜ ~ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? ➜ ~ sudo apt-get update Fetched 616 kB in 25s (23.9 kB/s) 

As you can notice, it completed without problems when I used sudo . If you have any open (13: Permission denied) it is almost sure that you are not root and need to use sudo .

Источник

How to install when permission denied to /usr/local/bin/ [closed]

I need a quick help. I am a beginner so I think my problem is an easy one: Here it goes: I need to install a software application called muscle, and these are the steps from its website:

wget http://www.drive5.com/muscle/downloads3.8.31/muscle3.8.31_i86linux64.tar.gz tar xzvf muscle3.8.31_i86linux64.tar.gz mv muscle3.8.31_i86linux64 /usr/local/bin/muscle chmod a+x /usr/local/bin/muscle 

But it is permission denied to /usr/local/bin/ . So, I created a directory called /home/users/me/muscle instead of /usr/local/bin/ and continued the steps. Finally, I added the directory to the path. It did not work. Note: sudo command asks for a password which I do not have.

Читайте также:  Linux openvpn server настройка

«Whenever I run my code-script which uses muscle» Please edit and add your code script to the question.

By design, only root can write to system folders, users have access to their userspaces only. In Debian and derivatives sudo is used to temporarily gain elevated privileges.

@104078 Then you cannot install the software and a systems administrator who does have sudo rights needs to install it for you.

@JakeGould If “installing software” means just running an executable, it does not have to live in /usr/local/bin , but could also be ~/bin , where no super user rights are needed.

2 Answers 2

If you cannot get sudo rights with your user, you cannot write to /usr/local/bin . However, that might not even be necessary, as you can also install programs somewhere else, and amend your $PATH environment variable, which tells your shell where it can find executable programs.

So, I created a directory called /home/users/me/muscle instead of /usr/local/bin/ and continued the steps. Finally, I added the directory to the path. It did not work.

The recommended place to put your own user binaries would be ~/bin , that is /home//bin .

So copy the file to ~/bin/muscle (create the folder if it does not exist):

mkdir -p ~/bin mv muscle3.8.31_i86linux64 ~/bin/muscle chmod +x ~/bin/muscle 

Save the file. Now, you need to make sure that your $PATH contains that bin directory.

If there is a file called ~/.bash_profile , edit it, or if it does not exist, simply create it, and add the following:

Now, you need to have your shell reload the paths where it can find binaries. There are several ways to do that, but the easiest is to log out and back in.

When you now echo $PATH , it should contain that bin directory. And when you run muscle , it should find that, because it’s in the $PATH .

Источник

Оцените статью
Adblock
detector