SUSE环境进行编译,出现如下错误:
/usr/lib/gcc/i586-suse-linux/4.1.2/../../../../i586-suse-linux/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
make: *** [libbn_interface.so] Error 1
上面的错误说明找不到crypto的动态库,去系统中查找是否存在crypto动态库。
localhost:/ # ls /usr/lib/*crypto*
/usr/lib/libcrypto.so.0.9.7 /usr/lib/libcrypto.so.0.9.8 /usr/lib/libk5crypto.so.3 /usr/lib/libk5crypto.so.3.0
说明存在crypto动态库,只需要建立链接即可
localhost:/ # ln -s /usr/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so
创建链接后查看:
localhost:/ # ls /usr/lib/*crypto*
/usr/lib/libcrypto.so /usr/lib/libcrypto.so.0.9.8 /usr/lib/libk5crypto.so.3.0
/usr/lib/libcrypto.so.0.9.7 /usr/lib/libk5crypto.so.3
然后再编译就成功了。
OS版本如下:
localhost:/ # more /etc/SuSE-release
SUSE Linux Enterprise Server 10 (i586)
VERSION = 10
PATCHLEVEL = 1