1. 程式人生 > >centos4.X 安裝python2.7.X SSL模組

centos4.X 安裝python2.7.X SSL模組

原始碼方式安裝Python2.7.9

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _tkinter           bsddb185        
dl                 imageop            sunaudiodev     
To find the necessary bits, look in setup.py in detect_modules() for the module's name
. Failed to build these modules: _ssl

檢視編譯日誌:

gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/local/include -I/root/download/Python-2.7.9/Include -I/root/download/Python-2.7
.9 -c /root/download/Python-2.7.9/Modules/_ssl.c -o build/temp.linux-x86_64-2.7/root/download/Python-2.7.9/Modules/_ssl.o /root/download/Python-2.7.9/Modules/_ssl.c: In function `_get_peer_alt_names': /root/download/Python-2.7.9/Modules/_ssl.c:801: warning: passing arg 2 of `ASN1_item_d2i' from incompatible pointer type /root/download/Python-2.7
.9/Modules/_ssl.c:806: warning: passing arg 2 of pointer to function from incompatible pointer type /root/download/Python-2.7.9/Modules/_ssl.c: In function `PySSL_cipher': /root/download/Python-2.7.9/Modules/_ssl.c:1358: warning: passing arg 1 of `SSL_CIPHER_get_name' discards qualifiers from pointer target type /root/download/Python-2.7.9/Modules/_ssl.c:1368: warning: passing arg 1 of `SSL_CIPHER_get_version' discards qualifiers from pointer target type /root/download/Python-2.7.9/Modules/_ssl.c:1378: warning: passing arg 1 of `SSL_CIPHER_get_bits' discards qualifiers from pointer target type /root/download/Python-2.7.9/Modules/_ssl.c: In function `cert_store_stats': /root/download/Python-2.7.9/Modules/_ssl.c:3084: warning: implicit declaration of function `X509_check_ca' /root/download/Python-2.7.9/Modules/_ssl.c: In function `init_ssl': /root/download/Python-2.7.9/Modules/_ssl.c:3970: error: `X509_V_FLAG_X509_STRICT' undeclared (first use in this function) /root/download/Python-2.7.9/Modules/_ssl.c:3970: error: (Each undeclared identifier is reported only once /root/download/Python-2.7.9/Modules/_ssl.c:3970: error: for each function it appears in.)

由於centos4.9中的openssl版本較低:

[[email protected] Python-2.7.9]# yum list installed | grep openssl
openssl.i686                             0.9.7a-43.18.el4       installed       
openssl.x86_64                           0.9.7a-43.18.el4       installed       
openssl-devel.i386                       0.9.7a-43.18.el4       installed       
openssl-devel.x86_64                     0.9.7a-43.18.el4       installed       
xmlsec1-openssl.x86_64                   1.2.6-3.2              installed       
xmlsec1-openssl.i386                     1.2.6-3.2              installed       

手工編譯一份較新的:openssl-0.9.8e.tar.gz

然後修改Python2.7.9/Module/Setup
SSL修改為手工安裝的路徑即可

# 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

相關推薦

centos4.X 安裝python2.7.X SSL模組

原始碼方式安裝Python2.7.9 Python build finished, but the necessary bits to build these modules were not found: _bsddb _tkin

CentOS6.x機器安裝Python2.7.x

詳細 我們 再次 技術分享 des pyc 比較 oss ack 1 mv /usr/bin/python /usr/bin/python.bak 2 vim `which yum` 修改解釋器 修改成什麽mv之後的python名字,

centos 6.8 安裝python2.7.x環境

簡單記錄下,centos6.x 上安裝 python2.7.x 過程: 1、系統版本:CentOS-6.8-x86_64-minimal.iso 2、安裝: 1>安裝前準備: 保證系統能上網然後用yum命令安裝以下軟體:make、zlib-devel、bzip2-de

Cent OS 7.x 安裝Zabbix 3.x

zabbix centos 系統環境: VMware Workstation 12 Pro 12.5.0Cent OS 7.3_1611Zabbix 3.2---以下操作均以root身份操作---1:設置網卡為開機啟動Shell>ifconfig1. [root@localhost

centos 7.x 安裝docker1.17.x

alt margin inux res inf bsp import -o pro CentOS Linux release 7.0.1406 (Core)Linux 10-4-21-101 3.10.0-123.4.4.el7.x86_64一、安裝基礎依賴1、卸載老版本s

python2.7.X 升級至Python3.6.X

進行 生效 openss too site 通過 bsp python ack 安裝Python3 項目是在py3環境下進行編碼的,正好yczhang默認的py版本是2,我們還需要安裝py3才能讓程序run起來,在此之前,需要安裝開發工具包,因為要編譯安裝Python

Windows10下安裝Python2.7模組mod_wsgi提示找不到apr_perms_set.h問題的解決辦法

環境:Windows 10 x86,Apache 2.4.x,Python 2.7.x,Microsoft Visual C++ Compiler Package for Python 2.7 安裝 mod_wsgi前,需要先設定環境變數MOD_WSGI_APACHE_ROOTDI

解決python2.7.x在windows系統下檔案寫入中文報錯

分析:windows下cmd預設的編碼是ASCII編碼 ,windows的中文環境下編碼是GBK 方法一:在儲存輸出流儲存的時候做一個對文字GBK編碼,在輸出到檔案 如下 title = t

ubuntu上編譯安裝mysql5.7.x【多次錯誤之後總結的方法】

1.進入mysql官網->Downloads->MySQL Community Edition->MySQL Community Server->Select Platform

Linux下安裝Mysql5.7.x資料庫

首先檢查是否存在mariadb 如果存在需要解除安裝 ps -ef| grep mariadb mysql    31760 28814  0 18:16 pts/1    00:00:00 grep --color=auto mariadb rpm -qa |

[2018年6月15日] Unity 3D 如何安裝C# 7.x+ 環境

其他有趣的事情從編寫我們自己的編譯器中得到的其他很酷的東西是對C#7.2的支援,它為您提供漂亮的引用返回,只讀和引用。 我們還為您提供編寫自己的語言規則和自定義錯誤訊息的能力。 如果您希望在Update方法中或在for迴圈中使用GetComponent <>時執行編碼約定或生成編譯錯誤,這非常有用

【Linux】 CentOS6.5安裝Python2.7以及pip等工具

自己 lin 存在 lean prefix nbsp ase 路徑 details 原文地址http://blog.csdn.net/u012538536/article/details/47360929。 CentOS6.5下是原來就有python的,我的鏡像裏面自帶的

【redis】之centos6.x安裝redis3.0.x

local con releases 新建 zxvf 分享 執行 .tar.gz all centos6.9_x86_64 1、下載redis安裝包 http://download.redis.io/releases/redis-3.2.9.tar.gz 2、解壓 tar

linux安裝python2.7

set python round get 目錄 ron clas strong .org linux自帶的python是2.6版本的,用習慣了2.7.x,所以想升級python2 1.下載源碼包,後面的下載鏈接直接在python官網找的,如果想安裝更高的版本自行更換 wg

ubuntu優麒麟 安裝python2.7.11

linux pythonwget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tar.xzxz -d Python-2.7.11.tar.xztar -xvf Python-2.7.11.tarcd Python-2.7.11./config

安裝python2.7

ins sta 工作 version alt fig www. str extract 1.安裝Development Tools yum groupinstall -y ‘development tools‘2安裝SSL、bz2、zlib來為Python的安裝做好準備工作

centos 6 安裝python2.7和pip

connect root 步驟 lan cts download evel ror test 由於scrapy1.0的發布,想在Linux上測試,所以安裝了centos6.6;但是它的python版本為2.6,很多東西都不支持,所以需要升級為2.7; 首先是在window

CentOs6.x安裝php5.6.x

php linux 安裝php 一、系統及安裝說 系統:CentOS6.x_x64,php5.6.12版本以及四個擴展模塊(libmcrypt-2.5.8.tar.gz ;php-redis.tar.gz;jpegsrc.v8d.tar.gz ;zendopcache-7.0.5.tar

CentOs6.x安裝mongodb3.4.x

mongo mongodb mongo報錯 linux安裝mongodb 一、系統及安裝說明 系統:CentOS6.x_x64,mongodb-3.4.10。mongodb官方下載地址 https://fastdl.mongodb.org/linux/mongodb-linux-x8

Centos 6.x和Centos 7.x的不同

Centos 6.x和CentosCentos 6.x和Centos 7.x的不同