permissions - 当我执行 'make install' 时,它不会创建目录

标签 permissions file-permissions automake permission-denied make-install

这是我第一次尝试使用 autoconf,我更改并向实用程序添加了一些不同的代码,然后我获取了 make.am 和我需要的其他文件,我修改了它们以与我编写的内容一起使用,进入同一个程序。因为它与该文件一起工作,所以我需要更改的只是名称和版本以及 main.c 和头文件名。当我这样做时,配置,然后制作,一切都很顺利。当我进入“make install”时,我收到此错误,我不知道为什么。

Making install in src
make[1]: Entering directory `/home/userx/Dropbox/mhsetroot-MAKE/src'
make[2]: Entering directory `/home/userx/Dropbox/mhsetroot-MAKE/src'
/bin/bash ../config/mkinstalldirs /usr/local/bin
/usr/bin/install -c mhsetroot /usr/local/bin/mhsetroot
/usr/bin/install: cannot create regular file `/usr/local/bin/mhsetroot': Permission denied
make[2]: *** [install-binPROGRAMS] Error 1
make[2]: Leaving directory `/home/userx/Dropbox/mhsetroot-MAKE/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/userx/Dropbox/mhsetroot-MAKE/src'
make: *** [install-recursive] Error 1

它不允许它创建目录。所以,我厌倦了。

mkdir /usr/local/bin/mhsetroot

我遇到了同样的错误,因此这只是权限问题,对吗 如果这就是全部,那么它应该可以在别人的计算机上运行,​​而不是在我的计算机上?另外,那么我需要在my“local/bin”上设置什么权限,以便“make install”无需先处于“sudo”模式即可工作?

最佳答案

尝试这样做 sudo make install 命令,因为您需要拥有 root 访问权限。 因此,每当您 出现权限错误,尝试将 sudo 放在命令开头,然后输入 root 密码。有用。 :)

关于permissions - 当我执行 'make install' 时,它不会创建目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20815971/

相关文章:

c++ - libtool 有什么用处,什么时候用?

linux - 为什么/var/www/需要755权限?为什么chown之后不是700?

linux - Bottle.py MVC "Template not found."

code-generation - Automake、生成的源文件和 VPATH 构建

c# - 在c#中打开文件进行读取时出错

google-drive-api - 转移用户谷歌驱动器中所有文件的所有权 - 使用 google-api-java-client 和驱动器 SDK

makefile - automake:修改隐式 make 规则以包含额外的标志

android - 无法让 android 连接到互联网(权限被拒绝)

ubuntu - WSL2 Golang 安装工具 : Permission denied

php - 删除sql转储文件