首页 > 其他 > 详细

openwrt编译错误you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment........

时间:2019-10-10 13:54:11      阅读:589      评论:0      收藏:0      [点我收藏+]

在openwrt编译的时候出现错误

you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this

网上查找到解决办法:

export FORCE_UNSAFE_CONFIGURE=1

或者

export FORCE=1

但是都没有解决问题!!!

使用Linux下的 “ll” 或者 “ls -lht” 一下文件(夹)的拥有者

Ubuntu@songshuai:~/openwrt$ ll
总用量 40
drwxrwxr-x  9 Ubuntu Ubuntu 4096 10月 10 10:50 ./
drwxr-xr-x 38 Ubuntu Ubuntu 4096 10月 10 12:20 ../
drwxrwxr-x 17 root Ubuntu 4096 10月 10 12:16 openwrt/
-rwxrwxrwx  1 Ubuntu Ubuntu 1768 10月 10 10:22 readme*

然后使用命令 “su” 切换到 root 用户然后再进行编译。

还是一样的,没有解决!!!

然后使用 “chown” 命令更改一下文件(夹)的拥有者为当前用户

Ubuntu@songshuai:~$ sudo chown -R $USER openwrt

注意 openwrt 后面的 / 字符,不然的话 不包括 openwrt 目录的 。

然后再查看 “ll”

Ubuntu@songshuai:~/openwrt$ ll
总用量 40
drwxrwxr-x  9 Ubuntu Ubuntu 4096 10月 10 10:50 ./
drwxr-xr-x 38 Ubuntu Ubuntu 4096 10月 10 12:20 ../
drwxrwxr-x 17 Ubuntu Ubuntu 4096 10月 10 12:16 openwrt/
-rwxrwxrwx  1 Ubuntu Ubuntu 1768 10月 10 10:22 readme*

然后进行编译,通过了!!!

openwrt编译错误you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment........

原文:https://www.cnblogs.com/songshuaiStudy/p/11647441.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!