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 am a beginner to Linux. I tried to install a program via console. It may take much time if I ask to software owners and I think problem is with my Linux knowledge. The steps were

mkdir build
cd build
cmake ..
make

Until this point everything seems to be OK. But when I type make install subsequently, it gives error as,

[100%] Built target gmsh
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/bin/gmsh
Cmake Error at cmake_install.cmake:36 (FILE):
    file INSTALL cannot copy file " /home/orxan/build/gmsh" to "/usr/local/bin/gmsh".

make: *** [install] Error 1
share|improve this question

migrated from stackoverflow.com Mar 2 '12 at 16:15

This question came from our site for professional and enthusiast programmers.

1  
try sudo make –  perreal Mar 2 '12 at 15:33
4  
Do you have permission to write to /usr/local/ ? sudo make install will probably do the trick. –  wildplasser Mar 2 '12 at 15:33
1  
Off-topic here. I suggest asking on unix. –  Oded Mar 2 '12 at 15:34
    
@perreal,wildplasser: that solved problem. Thank you. –  Shibli Mar 2 '12 at 15:37

1 Answer 1

cannot copy file " /home/orxan/build/gmsh" to "/usr/local/bin/gmsh"

In this case, you will need sudo privileges to write to /usr/local/bin, as it's owned by root.

sudo make install

Actually, this is the case for most software installations. make itself doesn't require these privileges, but installing almost exclusively does. You can theoretically chown the /usr/local/bin directory to be owned by you, but this could cause unforeseen problems.

share|improve this answer
    
Often, you can make install DESTDIR=/tmp/softinst/ without being root, then copy recursively it, e.g. sudo cp -v -R -p /tmp/softinst/. /. –  Basile Starynkevitch Mar 2 '12 at 17:33

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.