当我按照这里的步骤创建一个交叉复杂env时,[http://crosstool-ng.org/ ]
我犯了这样一个错误:
root@gpl-vm:~# ct-ng build
[ERROR] You must NOT be root to run crosstool-NG
[00:00] / make: *** [build] Error 1当我切换到普通用户时,它说我无权执行命令。
发布于 2018-11-01 10:15:21
CT_ALLOW_BUILD_AS_ROOT=y
在d5900debd397b8909d9cafeb9a1093fb7a5dc6e6 (2018年6月)中,如果您真正知道自己在做什么,则允许您将其构建为根用户:
CT_EXPERIMENTAL=y
CT_ALLOW_BUILD_AS_ROOT=y
CT_ALLOW_BUILD_AS_ROOT_SURE=y它们可以在菜单上访问:
但是,我建议您仔细阅读该选项的帮助:
│ You normally do *not* need to be root to build a toolchain using │
│ crosstool-NG. In fact, it is *VERY* dangerous to run as root, as │
│ crosstool-NG will, as part of the build process, remove a few │
│ directories. If anything goes wrong, running as root can ruin │
│ your host distribution. │
│ │
│ I can't stress it enough: DO NOT RUN AS ROOT !! │
│ │
│ Do not run as root, you've been warned. │
│ Do not come whining, if it nukes your host system. │
│ Do not come whining, if you lose any data. │
│ Do not run as root. │
│ │
│ Do not run as root, you've been warned. │
│ Do not come whining, if the Earth stops rotating. │
│ Do not come whining, if kittens are smashed. │
│ Do not run as root. │
│ │
│ Do not run as root, do not run as root! │
│ (ad libitum) │
│ 也许这方面最可接受的用例是以我在这里做的形式在Docker中运行交叉工作台-NG。它起作用了。
通过在源代码中添加错误消息发现:-)
发布于 2016-05-16 07:32:43
您不能使用根用户。要构建它,请使用(普通用户)。
试一试
# adduser crosstoolng
# chown crosstoolng:crosstoolng <crosstool-path>
# su crosstoolng
$ ./ct-ng build发布于 2017-10-27 22:39:12
您可以将can构建为root。您需要显式地允许这一点,并在menuconfig中确认。路径和misc选项中有一个条目。
https://stackoverflow.com/questions/17466017
复制相似问题