-1

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

1 Answer 1

0
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.

1
  • Often, you can make install DESTDIR=/tmp/softinst/ without being root, then copy recursively it, e.g. sudo cp -v -R -p /tmp/softinst/. /. Mar 2, 2012 at 17:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .