源碼編譯libcurl的時(shí)候,由于使用的不是默認(rèn)系統(tǒng)上的ssl庫(開發(fā)服務(wù)器上有很多個(gè)版本),為了避免動(dòng)態(tài)庫鏈接問題,必須定制SSL。
根據(jù)其源碼里邊的說明,
只需要在./configure 后邊加上 --with-ssl=<path>即可。
開始的時(shí)候,沒留意這個(gè),因?yàn)榇致話呙枇艘幌?--help, 后邊這么說了:
--with-libssh2=PATH Where to look for libssh2, PATH points to the
LIBSSH2 installation (default: /usr/local/lib); when
possible, set the PKG_CONFIG_PATH environment
variable instead of using this option
我的目標(biāo)庫的確就是在/usr/local/ssl下邊了,當(dāng)時(shí)編譯之后,鏈接起來總是提示找不到對(duì)應(yīng)版本的libssl.so.0.9.7.
后來才發(fā)現(xiàn)(將環(huán)境變量做小幅調(diào)整、改動(dòng)來探測(cè)),這個(gè)default在Solaris上邊并不是真的default,必須顯示指定為/usr/local/ssl,否則找到的居然是/usr/sfw/。