openssl 和libcurl的安裝


/usr/lib/aarch64-linux-gnu/qt5/bin/qmake CONFIG+=release


1 SET(CMAKE_PREFIX_PATH /home/qilin64/Qt5.6.0/5.6/gcc_64/) 解決缺少.qmake文件 或cmake 后面參數加上-DCMAKE_PREFIX_PATH=path/to/qt5widgets
2 下載libcurl源碼進行安裝,將/usr/local/lib/libcurl.so.3.20 拷貝到/opt/DZWJSJ/lib目錄下 解決找不到libcurl庫
3 將qt安裝目錄的gcc_lib 的lib目錄添加到/etc/ld.config文件中。然后lddconfig 解決libqtcore5.6.0庫找不到
4 刪除cmakelists.txt文件中帶ui的庫


報錯:cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)
Segmentation fault (core dumped)
Something like yours.I fixed it like this:

解決:sudo ln -fs /usr/lib/libcurl.so.4 /usr/local/lib/


cc="-fPIC" ./configure --disable-shared --enable-static --disable-ftp --disable-ipv6 --disable-rtsp --disable-tftp --disable-telnet --disable-largefile --disable-smtp --disable-imap --without-libssh2 --without-zlib --without-librtmp --without-libidn --without-gnutls --disable-ldap --disable-ldaps --disable-pop3 --with-ssl


一、安裝openSSL
1. 下載
最新版本:https://www.openssl.org/source/
我用的版本是 openssl-1.1.0g.tar.gz

2. 解壓
執行命令:tar -xzf openssl-1.1.0g.tar.gz,得到openssl-1.1.0g文件夾

3.配置
切換目錄:cd openssl-1.1.0g

執行命令:./config --prefix=你要安裝的路徑
例如:./config --prefix=/usr/local/openssl
也可以僅執行./config,其默認路徑為/usr/local/ssl

執行命令:./config -fPIC

4.安裝
執行命令:
make depend
make install

5.測試
執行命令:
openssl version
此處掛了

openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
1
這是由於openssl庫的位置不正確造成的。

可以創建兩個軟連接來解決
執行兩個命令:

ln -s /usr/local/ssl/lib/libssl.so.1.1 /usr/lib/libssl.so.1.1
ln -s /usr/local/ssl/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1

再次執行:
openssl version

完成!

二、安裝Curl
1. 下載
最新版本:https://curl.haxx.se/download.html
我用的版本是curl-7.57.0.tar.gz

2. 解壓
執行命令:tar -xzf curl-7.57.0.tar.gz,得到curl-7.57.0文件夾

3.配置
執行命令:

1 cd curl-7.57.0
2 執行該命令產生makefile:
cc="-fPIC" ./configure --disable-shared --enable-static --disable-ftp --disable-ipv6 --disable-rtsp --disable-tftp --disable-telnet --disable-largefile --disable-smtp --disable-imap --without-libssh2 --without-zlib --without-librtmp --without-libidn --without-gnutls --disable-ldap --disable-ldaps --disable-pop3 --with-ssl

4.安裝
執行命令:make
此處掛了
執行以下命令:

./configure –disable-ldap –disable-ldaps

重新make,沒有出現error


執行命令:make install


查看信息:curl -V,此處可以看到curl已經支持https協議了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM