openindiana node compiling error no C compiler

左心房为你撑大大i 提交于 2019-12-24 12:18:17

问题


I am trying to compile node.js on openindiana, below is my Environment, Even I set gcc path in .profile It keeps saying No acceptable C compiler found!

export PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc/4.4.4/bin:/usr/gnu/bin:$PATH
export PAGER="/usr/bin/less -ins"
export CC=/opt/gcc/4.4.4/bin/gcc
export cc=/opt/gcc/4.4.4/bin/gcc

run

$ CC=gcc ./configure --with-dtrace --dest-cpu=x64 --prefix=~/local

or

$ ./configure --with-dtrace --dest-cpu=x64 --prefix=~/local

both of them gives following error Node.js configure error: No acceptable C compiler found!

    Please make sure you have a C compiler installed on your system and/or
    consider adjusting the CC environment variable if you installed
    it in a non-standard prefix.

nick@www:~/node-latest-install$ echo $PATH

/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc/4.4.4/bin/gcc

nick@www:~/node-latest-install$ which gcc

/usr/bin/gcc

nick@www:~/node-latest-install$ which cc

which: no cc in (/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc/4.4.4/bin/gcc)

nick@www:~/node-latest-install$ gcc -v

Using built-in specs. Target: i386-pc-solaris2.11 Configured with: /home/jt/OI-151A-STABLE/151A-PRESTABLE6/newbuilds/oi-build/components/illumos-gcc/richlowe-gcc-f268959/configure --prefix=/opt/gcc/4.4.4 --with-gnu-as --with-as=/usr/sfw/bin/gas --with-ld=/usr/bin/ld --without-gnu-ld --enable-languages=c,c++,objc --enable-shared --with-mpfr-include=/usr/include/mpfr --with-gmp-include=/usr/include/gmp Thread model: posix gcc version 4.4.4 (GCC)


回答1:


if you specify CC variable, make it absolute path to gcc: CC=/opt/gcc/4.4.4/bin/gcc. But if compiler is already in PATH, specifying CC shouldn't be necessary.




回答2:


This may sound like a stupid answer but have you tried removing it and re-installing it from package manager. GCC that is

Also when did the problem start occurring? You could use beadm to roll back the OS to the last update or to when you created a 'Restore Point' so to speak. Check it out, very useful thing to use before running installs.



来源:https://stackoverflow.com/questions/17444175/openindiana-node-compiling-error-no-c-compiler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!