1. 程式人生 > >openssl編譯出錯解決

openssl編譯出錯解決

tar -jxvf trafficserver-3.0.2.tar.bz2

./configure --prefix=/usr/install/trafficserver --with-user=cache --with-group=cache --enable-debug

出現很奇怪的報錯:

/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: /usr/local/ssl/lib/libcrypto.a(md5_dgst.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC


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

查了下資料說是openssl的問題,要編譯成shared,所以用如下引數編譯openssl

./config --prefix=/usr/local/ssl enable-shared

這樣就能解決上面的錯誤!!!