/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

/usr/local/lib/libz.a: could not read symbols: Bad value

一般是64 位 电脑才会出现。

 

解决方法如下:

cd zlib-1.2.3 //进入zlib目录

CFLAGS="-O3 -fPIC" ./configure   //使用64位元的方法进行编译

make

make install

make clean