2013-07-03 112 views
1

我試圖彙編的OpenIndiana node.js的,下面是我的環境, 連我設置的gcc路徑.profile 口口聲聲說 沒有可接受的C編譯器找到了!的OpenIndiana節點編譯錯誤沒有C編譯器

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 

運行

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

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

他們都給出以下錯誤 Node.js的配置錯誤:沒有可以接受的C編譯器找到了!

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. 

[email protected]:~/node-latest-install$ echo $PATH

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

[email protected]:~/node-latest-install$ which gcc

的/ usr /斌/ GCC

[email protected]:~/node-latest-install$ which cc

其中:無CC在(/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/gcc/4.4.4/bin/gcc)

[email protected]:~/node-latest-install$ gcc -v

使用內置的規格。 Target:i386-pc-solaris2.11 配置:/ home/jt/OI-151A-STABLE/151A-PRESTABLE6/newbuilds/oi-build/components/illumos -gcc/richlowe -gcc -f268959/configure - 前綴=/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版本4.4.4(GCC)

+0

您是否檢查過'config.log'中的詳細錯誤消息,它顯示了它試圖運行的命令以及從它們得到的錯誤? – alanc

+0

@alanc我沒有找到一個'config.log',我目前的'.profile'是在[這個GIST](https://gist.github.com/nickleefly/65f78c41772f23894a31)你可以看看有什麼不對嗎? – nickleefly

回答

1

如果您指定CC變量,使其成爲gcc的絕對路徑:CC=/opt/gcc/4.4.4/bin/gcc。但是如果編譯器已經在PATH中,指定CC不應該是必需的。

+0

它沒有工作,我更新'.profile'到問題 – nickleefly

0

這可能聽起來像一個愚蠢的答案,但你嘗試刪除它,並從包管理器重新安裝它。 GCC即

問題何時開始發生?您可以使用beadm將操作系統回滾到上次更新或創建「還原點」的時間。檢查一下,運行安裝之前使用非常有用的東西。

+0

我試着重新安裝'GCC',這個問題發生在我安裝它時 – nickleefly