2013-07-30 80 views
0

我的Fedora VM上有Python 2.7,我想升級到Python 3.3.2。我這樣做:無法安裝最新版本的Python:出錯?

wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2 
tar xf Python-3.3.2.tar.bz2 
cd Python-3.3.2 
./configure --prefix=/usr/local 

,然後試圖

make 

只有得到這個錯誤:

Objects/abstract.c:2281:20: error: variable 'countva' is uninitialized when 
     used here [-Werror,-Wuninitialized] 
     Py_VA_COPY(countva, va); 
     ~~~~~~~~~~~^~~~~~~~~~~~ 
Include/pyport.h:875:37: note: expanded from: 
#define Py_VA_COPY(x, y) Py_MEMCPY((x), (y), sizeof(va_list)) 
            ^
Objects/abstract.c:2278:20: note: initialize the variable 'countva' to 
     silence this warning 
    va_list countva; 
       ^
        = NULL 
1 error generated. 
make: *** [Objects/abstract.o] Error 1 

...什麼?我該如何解決? Python安裝文件應該沒有問題,應該在那裏?

回答

0

Python歸檔沒有錯,它必須是你的環境。

我在我的系統上覆制了您的確切步驟,並在我的系統上運行。我認爲-Werror切換是責備。它會將警告轉化爲錯誤。你的編譯器實際遇到的僅僅是一個警告。

你能輸入相同的終端echo $CFLAGS併發布輸出嗎?在我的系統上,這個命令會產生一個空行。也許你在~/.bashrc中設置了一些CFLAGS?或者您可能在您的~/.bashrc中設置CFLAGS的文件source