openwrt make出错

博客提到从GitHub克隆的OpenWrt项目编译时出错,原因是文件属主不是操作者。解决办法是为整个文件夹添加自身权限,之后即可正常编译。

编译时出现以下错误:

checking whether mknod can create fifo without root privileges... configure: error: in  `/tmp/lede/build_dir/host/tar-1.29':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
Makefile:30: recipe for target '/tmp/lede/build_dir/host/tar-1.29/.configured' failed
make[3]: *** [/tmp/lede/build_dir/host/tar-1.29/.configured] Error 1
make[3]: Leaving directory '/tmp/lede/tools/tar'
tools/Makefile:150: recipe for target 'tools/tar/compile' failed
make[2]: *** [tools/tar/compile] Error 2
make[2]: Leaving directory '/tmp/lede'
tools/Makefile:148: recipe for target '/tmp/lede/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnnyyyyyyyyyyyyyyyyyyyynnyynynyyyynny' failed
make[1]: *** [/tmp/lede/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnnyyyyyyyyyyyyyyyyyyyynnyynynyyyynny] Error 2
make[1]: Leaving directory '/tmp/lede'
/tmp/lede/include/toplevel.mk:207: recipe for target 'world' failed
make: *** [world] Error 2

因为整个项目是从GitHub上克隆下来的,文件属主不是你,你需要为整个文件夹添加你的权限

sudo chown -R $USER openwrt

或者

sudo export FORCE_UNSAFE_CONFIGURE=1

然后就可以编译了。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值