2016-08-01 29 views
0

我已經嘗試在pyenv env中安裝python,其中我得到下面的錯誤。我已經將openssl添加到路徑變量中,因爲openssl已經可用了,但它仍然會拋出相同的錯誤。錯誤:缺少OpenSSL庫?而試圖在pyenv/SUSE12環境中安裝python

此外,現在嘗試與一個單獨的用戶(而不是根)。同樣的錯誤!並試圖關注維基頁面,但對於OpenSUSE,我無法在Google上找到太多幫助。

有人可以指導我如何進一步處理。

[email protected]:~/.pyenv> pyenv install 3.5.2 
    Downloading Python-3.5.2.tar.xz... 
    -> https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz 
    Installing Python-3.5.2... 
    WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib? 
    WARNING: The Python readline extension was not compiled. Missing the GNU readline lib? 
    ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib? 

    Please consult to the Wiki page to fix the problem. 
    https://github.com/yyuu/pyenv/wiki/Common-build-problems 


    BUILD FAILED (SLES 12.1 using python-build 20160726) 

    Inspect or clean up the working tree at /tmp/python-build.20160801100205.31144 
    Results logged to /tmp/python-build.20160801100205.31144.log 

    Last 10 log lines: 
    (cd /home/xxxxx/.pyenv/versions/3.5.2/share/man/man1; ln -s python3.5.1 python3.1) 
    if test "xupgrade" != "xno" ; then \ 
      case upgrade in \ 
        upgrade) ensurepip="--upgrade" ;; \ 
        install|*) ensurepip="" ;; \ 
      esac; \ 
      ./python -E -m ensurepip \ 
        $ensurepip --root=/ ; \ 
    fi 
    Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS 

回答

1

Python中利用底層操作系統庫,以支持它的一些庫,看來你沒有這些庫安裝。在Ubuntu上,你應該能夠與

$ sudo apt-get install bzip2 libreadline6 libreadline6-dev openssl 

安裝它們對於SUSE 12,正如你所指出的,所需要的命令是

zypper -n install openssl libopenssl-devel 
+0

這些已安裝。爲了再次重新安裝,它顯示'最高可用版本已安裝'。爲所有的庫。有什麼我需要做的嗎? –

+0

你有* -dev版本來確保編譯找到支持庫嗎? – holdenweb

+0

是的,我已經安裝了。 zypper -n install openssl libopenssl-devel –

1

除了上面的回答我只好:

sudo apt-get install python-openssl

相關問題