編譯配置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用戶,重新執行編譯配置。