Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I used to be able to run make like normal, but now I have to run make as super user or else it will fail saying that the c compiler can't create executables. Why did this happen?

share|improve this question
6  
You don't have write permissions in the output directory with your current user. –  Daniel Beck May 2 '12 at 14:46
add comment

2 Answers 2

Might be that you did sudo make once by mistake, and now make wont work since it might need to rewrite files or write to dirs which were created under sudo and thus unwritable by normal user.

share|improve this answer
add comment

There is a distinction between make and make install. Make only compile your stuff, make install copies the executables in the system. Then make install has often to be executed as root (sudo make install) to get write access to destination directories (/bin, /sbin, /usr/bin ...). Stating that make itself fails to compile without root privilege is awkward indeed.

  1. Check that, as a user, you have read and write accesses to (all) the files you are trying to build. Especially if you get the sources from some third-parties (usbkey, web, ...), who knows how the permissions have been set by the author?
  2. Then ensure that you have read and write accesses to the folder where make will create the object files.
  3. Then be specific to us. What's the error make pops you? Do you have some logs to share?
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.