安装python时,出现以下错误:
usr/local/lib/libbz2.a: could not read symbols: Bad value
/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `.text’ can not be used when making a shared object; recompile with -fPIC
然后使用以下命令安装python。
./configure --prefix=/home/bhanuday/Softwares/Python/installation3/ LDFLAGS='-L/home/bhanuday/Softwares/library/libffi/installation/lib64 -L/home/bhanuday/Softwares/library/bzip2/installation/lib' CFLAGS="-I/home/bhanuday/Softwares/library/bzip2/installation/include"
make
make install