Why do I get permission denied when I try use “make” to install something?

后端 未结 5 391
走了就别回头了
走了就别回头了 2021-02-01 04:47

I\'m trying to install something and it\'s throwing me an error: Permission denied when I try to run make on it.

I\'m not too fond of the unive

5条回答
  •  一整个雨季
    2021-02-01 04:49

    On many source packages (e.g. for most GNU software), the building system may know about the DESTDIR make variable, so you can often do:

     make install DESTDIR=/tmp/myinst/
     sudo cp -va /tmp/myinst/ /
    

    The advantage of this approach is that make install don't need to run as root, so you cannot end up with files compiled as root (or root-owned files in your build tree).

提交回复
热议问题