Iam getting some error while installing executable in /usr/local/bin thru makefile:
install -m 755 my_execble /usr/local/bin
install: cannot create regular file /usr/local/bin/my_execble: Permission denied
If use sudo before 'install' command .. then it will work .. but is there other way of installing without using sudo?
The OP ask long time ago, but I will guess it can be useful for others.
Since your make install command try to install files in directory requiring root privileges (ex: /usr/local/bin) you can either:
sudo for example)OR
Install it in another directory that do not require specific privilege. For this purpose you can use a specific parameter named 'DESTDIR' that is usually supported in makefile, so that your command looks like:
make DESTDIR=/home/myuser/my_dest_dir install
This is named Staged Installs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With