2013-10-13 44 views
0

在將其標記爲重複項之前,我已經看到this問題,並嘗試了在那裏建議的符號鏈接方法。它不起作用。錯誤:GCC 4.8.1無法創建可執行文件

我在一個運行OS X 10.8.5的系統上安裝了Xcode 5.0和GCC 4.8.1,與命令行工具/開發工具無關。當試圖安裝cURL,我一旦運行./configure得到這個錯誤:

checking for gcc... gcc 
checking whether the C compiler works... no 
configure: error: in `/Users/me/Downloads/curl-7.32.0': 
configure: error: C compiler cannot create executables 

在檢查config.log,我發現這一點:

configure:4126: gcc -V >&5 
gcc: error: unrecognized command line option '-V' 
gcc: fatal error: no input files 
compilation terminated. 

除了這一點:

configure: failed program was: 
| /* confdefs.h */ 
| #define PACKAGE_NAME "curl" 
| #define PACKAGE_TARNAME "curl" 
| #define PACKAGE_VERSION "-" 
| #define PACKAGE_STRING "curl -" 
| #define PACKAGE_BUGREPORT "a suitable curl mailing list: http://curl.haxx.se/mail/" 
| #define PACKAGE_URL "" 
| /* end confdefs.h. */ 
| 
| int main (void) 
| { 
| 
| ; 
| return 0; 
| } 

我我不確定第一部分是否在./configure失敗中發揮作用,我完全不確定後一部分應該如何處理。

這個問題如何解決?

回答

0

很可能configure無法找到您指定的C編譯器。檢查以下至少一項是否正確:

  1. 您的編譯器位於您的$PATH環境變量的目錄中。
  2. 您調用configure的參數CC=是編譯器的有效路徑。
相關問題