openwrt: Build dependency: Please do not compile as root解决方法
2016-05-28 15:13
357 查看
编译openwrt出现:
Collecting package info: done
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'getopt'... ok.
Checking 'fileutils'... ok.
Checking 'working-gcc'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'gawk'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'patch'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'wget'... ok.
Checking 'git'... ok.
Checking 'gnutar'... ok.
Checking 'svn'... ok.
Checking 'gnu-find'... ok.
Checking 'getopt-extended'... ok.
Checking 'ocamlc'... ok.
Checking 'ocamlfind'... ok.
Checking 'non-root'... failed.
Build dependency: Please do not compile as root.
Prerequisite check failed. Use FORCE=1 to override.
make[1]: *** [tmp/.prereq-build] Error 1
make: *** [deconfig] Error 2
出现这个错误,这是因为openwrt为安全起见,默认对权限进行检查,推荐用非root的权限去编译,这个设置在include/prereq-build.mk 路径之下
解决方法:
命令行中输入vi include/prereq-build.mk
将prereq-build.mk 文件中,如下图标注的那一行注释掉即可(在前面加上#注释符号)
然后重新在qsdk目录下make defconfig
checking whether mknod can create fifo without root privileges... configure: error: in `/work/openwrt/build_dir/host/tar-1.28':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
Try the command indicated in the error message:
This being said, it is true the "unsafe configure" requirement seems a bit strange. Double-check the log (config.log) and see if there is something more explicit in there.
Collecting package info: done
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'getopt'... ok.
Checking 'fileutils'... ok.
Checking 'working-gcc'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'gawk'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'patch'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'wget'... ok.
Checking 'git'... ok.
Checking 'gnutar'... ok.
Checking 'svn'... ok.
Checking 'gnu-find'... ok.
Checking 'getopt-extended'... ok.
Checking 'ocamlc'... ok.
Checking 'ocamlfind'... ok.
Checking 'non-root'... failed.
Build dependency: Please do not compile as root.
Prerequisite check failed. Use FORCE=1 to override.
make[1]: *** [tmp/.prereq-build] Error 1
make: *** [deconfig] Error 2
出现这个错误,这是因为openwrt为安全起见,默认对权限进行检查,推荐用非root的权限去编译,这个设置在include/prereq-build.mk 路径之下
解决方法:
命令行中输入vi include/prereq-build.mk
将prereq-build.mk 文件中,如下图标注的那一行注释掉即可(在前面加上#注释符号)
然后重新在qsdk目录下make defconfig
checking whether mknod can create fifo without root privileges... configure: error: in `/work/openwrt/build_dir/host/tar-1.28':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
Try the command indicated in the error message:
export FORCE_UNSAFE_CONFIGURE=1 && make
This being said, it is true the "unsafe configure" requirement seems a bit strange. Double-check the log (config.log) and see if there is something more explicit in there.
相关文章推荐
- Linux socket 初步
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程
- Linux 下无损图片压缩小工具介绍