icecc / icemon

Icecream GUI Monitor
http://kfunk.org/tag/icemon/
GNU General Public License v2.0
91 stars 35 forks source link

error when do 'make install' #29

Closed gongzelong0718 closed 7 years ago

gongzelong0718 commented 7 years ago

Errors when build icemon on Ubuntu 14.04.

gongzelong@gongzelong-ThinkPad-X260:~/Documents/git/icemon/build$ make install
[  4%] Automoc for target icemon
[  4%] Built target icemon_automoc
[100%] Built target icemon
Install the project...
-- Install configuration: ""
-- Installing: /usr/bin/icemon
CMake Error at src/cmake_install.cmake:42 (FILE):
  file INSTALL cannot copy file
  "/home/gongzelong/Documents/git/icemon/build/src/icemon" to
  "/usr/bin/icemon".
Call Stack (most recent call first):
  cmake_install.cmake:37 (INCLUDE)

make: *** [install] Error 1
rakuco commented 7 years ago

It looks like you're trying to install the icemon binary to a system-wide location without having permission to do so. It's safer to just set the CMAKE_INSTALL_PREFIX when invoking cmake (e.g. cmake -DCMAKE_INSTALL_PREFIX=$HOME/icemon-install ..) to install it to a user-local directory.

gongzelong0718 commented 7 years ago

If I want to install it under /usr rather than $HOME (thought it will mess up my $HOME directory and not good looking) , Can I do sudo cmake -DCMAKE_INSTALL_PREFIX=/usr .. instead to fix that?

rakuco commented 7 years ago

If you want to go down that route, sudo make install should take of it, otherwise you will generate your entire build directory as root. Still, messing up your $HOME is a lot better than risking messing up your /usr...

gongzelong0718 commented 7 years ago

Thanks for your kind help:D