- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我想从源代码升级默认的python2.6.6到python2.7,我安装了:
yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
但是 _hashlib 和 _ssl 构建失败。
我的 openssl 已安装:
whereis openssl
openssl: /usr/bin/openssl /usr/lib/openssl /usr/lib64/openssl /usr/local/bin/openssl /usr/include/openssl /usr/share/man/man1/openssl.1ssl.gz
然后我取消注释关于 ssl 配置的模块/设置,如下所示:
# 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 --prefix=/usr/local/python27/ --enable-shared
make
它有错误:
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -DUSE_SSL -I/usr/local/ssl/include -I/usr/local/ssl/include/openssl -c ./Modules/_ssl.c -o Modules/_ssl.o
./Modules/_ssl.c: In function ‘newPySSLObject’:
./Modules/_ssl.c:307: warning: ‘TLSv1_method’ is deprecated (declared at /usr/local/include/openssl/ssl.h:1596)
./Modules/_ssl.c:309: warning: implicit declaration of function ‘SSLv3_method’
./Modules/_ssl.c:309: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast
/usr/local/include/openssl/ssl.h:1302: note: expected ‘const struct SSL_METHOD *’ but argument is of type ‘int’
./Modules/_ssl.c:312: warning: implicit declaration of function ‘SSLv2_method’
./Modules/_ssl.c:312: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast
/usr/local/include/openssl/ssl.h:1302: note: expected ‘const struct SSL_METHOD *’ but argument is of type ‘int’
./Modules/_ssl.c: In function ‘_create_tuple_for_X509_NAME’:
./Modules/_ssl.c:613: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:630: error: dereferencing pointer to incomplete type
./Modules/_ssl.c: In function ‘_get_peer_alt_names’:
./Modules/_ssl.c:732: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:736: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:741: error: dereferencing pointer to incomplete type
./Modules/_ssl.c:802: warning: ‘ASN1_STRING_data’ is deprecated (declared at /usr/local/include/openssl/asn1.h:553)
./Modules/_ssl.c: In function ‘PySSL_cipher’:
./Modules/_ssl.c:1140: warning: assignment discards qualifiers from pointer target type
./Modules/_ssl.c: In function ‘PySSL_RAND_egd’:
./Modules/_ssl.c:1610: warning: implicit declaration of function ‘RAND_egd’
make: *** [Modules/_ssl.o] Error 1
如果不使用 ssl,make 不是这个错误,它显示:
Python build finished, but the necessary bits to build these modules were not found:
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:
_hashlib _ssl
我想知道如何解决这个问题,谢谢。
最佳答案
尝试将 make 命令的输出(包括 stderr 和 stdout)重定向到一个文件,然后查看该日志。在我的例子中,我使用了安装在系统中的不同的 openssl
库。删除该库文件夹后,make
获取了正确的 openssl
库。
关于python - centos6.2 upgrade python2.7 _hashlib and _ssl build failed and make [Modules/_ssl.o] 错误1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40219892/
有人知道如何使用 ctypes 公开 python 2.x _hashlib.pyd 内部结构吗?我特别需要提取 EVP_MD_CTX 结构来序列化 python HASH 对象。 最佳答案 从头文件
尝试使用 gcc (Debian 6.2.1-7) 6.2.1 20161215 编译 Python 3.4.3 时出现以下错误: Failed to build these modules: _ha
我通过将源代码安装到我的 RHEL4 盒子中来添加 python 2.7.13 作为 altinstall wget --no-check-certificate https://www.python
我想从源代码升级默认的python2.6.6到python2.7,我安装了: yum groupinstall "Development tools" yum install zlib-devel b
我是一名优秀的程序员,十分优秀!