Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get permission denied when I try use "make" to install something?

I'm trying to install something and it's throwing me an error: Permission denied when I try to run make on it.

I'm not too fond of the universal rules of unix/linux and not too fond of user rights either. My best guess is that the user I'm logged in as does not have the privileges to run make commands, but hopefully it's something else that's not permitting me to install.

Why do I get Permission denied and what should I check or configure in order to attempt permission be granted?

EDIT

Error Message:

gcc -I. -O3 -o pp-inspector  pp-inspector.c make: execvp: gcc: Permission denied make: [pp-inspector] Error 127 (ignored) gcc -I. -O3 -c tis-vnc.c -DLIBOPENSSL -DLIBOPENSSLNEW -DLIBIDN -DHAVE_PR29_H -DLIBMYSQLCLIENT -DLIBPOSTGRES -DHAVE_MATH_H -I/usr/include/mysql make: execvp: gcc: Permission denied make: *** [tis-vnc.o] Error 127 
like image 597
CheeseConQueso Avatar asked Feb 02 '12 02:02

CheeseConQueso


People also ask

How do I resolve permission denied error?

Right-click the file or folder, and then click Properties. Click the Security tab. Under Group or user names, click your name to see the permissions that you have. Click Edit, click your name, select the check boxes for the permissions that you must have, and then click OK.

Why is it showing permission denied?

This error occurs when the user does not have the privileges to make edits to a file. Root has access to all files and folders and can make any edits. Other users, however, may not be allowed to make such edits. Remember that only root or users with Sudo privileges can change permissions for files and folders.

Why is mkdir permission denied?

[ErrorException] mkdir(): Permission denied That means you do not have write permission on your project folder. Create a new folder, say 'myproject and run sudo chmod 777 myproject . Then move to 'myproject' folder and create project.

How do I fix permissions denied in Linux?

To fix the permission denied error in Linux, one needs to change the file permission of the script. Use the “chmod” (change mode) command for this purpose.


2 Answers

Execute chmod 777 -R scripts/, it worked fine for me ;)

like image 109
D3473R Avatar answered Sep 23 '22 00:09

D3473R


On many source packages (e.g. for most GNU software), the building system may know about the DESTDIR make variable, so you can often do:

 make install DESTDIR=/tmp/myinst/  sudo cp -va /tmp/myinst/ / 

The advantage of this approach is that make install don't need to run as root, so you cannot end up with files compiled as root (or root-owned files in your build tree).

like image 41
Basile Starynkevitch Avatar answered Sep 22 '22 00:09

Basile Starynkevitch