2017-04-26 120 views
1

我debian下8錯誤SSL與Python(HTTPS)

我會試着安裝裝配:蟒蛇 - 電報BOT(https://github.com/python-telegram-bot/python-telegram-bot),但是當我做了 「蟒蛇的setup.py安裝」,它使一個錯誤:

Installed /usr/local/lib/python2.7/site-packages/python_telegram_bot-5.3.1-py2.7.egg 
Processing dependencies for python-telegram-bot==5.3.1 Searching for certifi 
Reading https://pypi.python.org/simple/certifi/ 
Download error on https://pypi.python.org/simple/certifi/: unknown url type: https -- Some packages may not be found! 

所以我試圖用開放SSL來重新安裝python 2.7.13:

apt-get install opensll 
apt-get install libssl-dev 

我編輯的/Modules/setup.dist:

# Socket module helper for socket(2) 
_socket socketmodule.c timemodule.c 

# Socket module helper for SSL support; you must comment out the other 
# socket line above, and possibly edit the SSL variable: SSL=/usr/local/ssl 
_ssl _ssl.c \ 
     -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ 
     -L$(SSL)/lib -lssl -lcrypto 

在那之後,我的./configure跑去做& &使安裝

我有錯誤:在安裝過程中:

Makefile:1081: recipe for target 'libinstall' failed make: *** [libinstall] 
Error 1 

和Python-電報機器人would'n編譯.. 。

有人可以有一個想法嗎?

非常感謝。 問候

回答

0

我得到了完全相同的錯誤,當我試圖從source安裝python2.7.13

我嘗試了很多東西,花了很多時間後才知道圖書館libreadline6-dev失蹤。

所以安裝了它:

sudo apt-get install libreadline6-dev 

,它爲我工作得很好。

下面是我用它來編譯和make install(命令裏面的Python-2.7.13目錄:

./configure --prefix /usr/bin/python2.7.13 
sudo make altinstall