编译配置erlang源码时报错:
[wlf@wlf186 otp_src_21.3]$ ./configure --prefix=/home/wlf/erlang
Ignoring the --cache-file argument since it can cause the system to be erroneously configured
Disabling caching
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/wlf/otp_src_21.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
报错信息提示没有可用的C编译器,还建议我们去看config.log,好吧,直接vi config.log看看:
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2153: checking build system type
configure:2167: result: x86_64-unknown-linux-gnu
configure:2187: checking host system type
configure:2200: result: x86_64-unknown-linux-gnu
configure:2300: checking for gcc
configure:2330: result: no
configure:2393: checking for cc
configure:2440: result: no
configure:2496: checking for cl.exe
configure:2526: result: no
configure:2550: error: in `/home/wlf/otp_src_21.3':
configure:2552: error: no acceptable C compiler found in $PATH
See `config.log' for more details
还是说没有找到gcc,我们自己确认下:
[wlf@wlf186 otp_src_21.3]$ gcc -v
-bash: gcc: command not found
那么就装一个吧,简单点就切换到root用户下执行
yum install gcc
再看下版本:
[root@wlf186 ~]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
OK,切换回wlf用户,重新执行编译配置。
来源:oschina
链接:https://my.oschina.net/u/4264465/blog/4270288