It'a way to use ssl by compiling python 2.7
it's reason that no openssl, openssl-devel in python with Centos
( if you using ubuntu, maybe no libssl, libssl-dev )
1. yum install openssl openssl-devel -y
2. Get the Python source in http://www.python.org
3. Extract Python source
4. open "Modules/Setup.dist" by vi
vi Modules/Setup.dist
5. search "SSL"
6. you can find it as follow
#SSL=/usr/local/ssl
#_ssl _ssl.c \
# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
# -L$(SSL)/lib -lssl -lcrypto
remove '#'
7. Compile the Python source
./configure
make
make install
8. enjoy it
댓글 없음:
댓글 쓰기