python安装错误求解

/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
running install
running build
running build_py
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/usr/include/python2.6 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
SWIG/_bio.i:64: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_rand.i:21: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_evp.i:160: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_dh.i:36: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_rsa.i:43: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_dsa.i:31: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_ssl.i:214: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_x509.i:323: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_pkcs7.i:44: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_pkcs7.i:44: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_util.i:11: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_ec.i:111: Warning 454: Setting a pointer/reference variable may leak memory.
SWIG/_engine.i:168: Warning 454: Setting a pointer/reference variable may leak memory.
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -I/usr/include -I/home/admin/zhangk/euca2ool/M2Crypto-0.21.1/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.linux-x86_64-2.6/SWIG/_m2crypto_wrap.o -DTHREADING
SWIG/_m2crypto_wrap.c: In function ‘pkey_get_modulus’:
SWIG/_m2crypto_wrap.c:4351: warning: value computed is not used
SWIG/_m2crypto_wrap.c:4376: warning: value computed is not used
SWIG/_m2crypto_wrap.c: In function ‘x509v3_lhash’:
SWIG/_m2crypto_wrap.c:6125: warning: return from incompatible pointer type
gcc -pthread -shared build/temp.linux-x86_64-2.6/SWIG/_m2crypto_wrap.o -L/usr/lib64 -L/usr/lib -lpython2.6 -lssl -lcrypto -o build/lib.linux-x86_64-2.6/M2Crypto/__m2crypto.so
/usr/bin/ld: /usr/lib64/libssl.a(s2_meth.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
运行命令如下:
sudo python setup.py install

安装python依赖文件
pip install docopt pygments

然后再执行
sudo python setup.py install
温馨提示:内容为网友见解,仅供参考
第1个回答  2013-09-05
你可以试试sudo apt-get install python-dev
第2个回答  2013-09-14
没有安装GCC相关的包
相似回答