【发布时间】:2017-08-28 13:40:24
【问题描述】:
我正在尝试在 Alpine Linux 上构建 GCC。我没有 root 访问权限或启用 sudo 的用户。我关注GCC Wiki。我得到了这个输出。
~/objdir $ $PWD/../gcc-5.2.0/configure --prefix=$HOME/gcc-5.2.0 --enable-languages=c,c++,fortran,go
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/asgeek/objdir':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
我在互联网上搜索了几天,但找不到合适的解决方案。请帮我解决这个问题。
提前致谢!
【问题讨论】:
-
我猜你可以调整你的运行环境的PATH变量并添加编译器所在的目录以便配置过程可以找到它。每个用户都可以在他们正在处理的会话上修改 PATH。
-
@Edmundo 我还没有安装 C 编译器来添加到 PATH 变量中。
-
听起来像是一个陷阱 22。我猜你需要一些其他的 C 编译器,这样你就可以构建 gcc。
-
@Edmundo 你知道在没有 root 或 sudo 用户的情况下安装其他 C 编译器的方法吗?
-
? Alpine Linux 中的默认“用户”
root不是吗? ...安装工具是apk。请通过apk | less了解如何安装需要的 gcc 和 g++ 等。(您还需要 mpfr、gmp 来构建额外的 gcc。)en.wikipedia.org/wiki/Alpine_Linux