openssl 和libcurl的安裝

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


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的庫linux


報錯: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:ssh

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


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測試


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

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

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

執行命令:./config --prefix=你要安裝的路徑
例如:./config --prefix=/usr/local/openssl
也能夠僅執行./config,其默認路徑爲/usr/local/sslorm

執行命令:./config -fPIChtm

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

完成!

2、安裝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協議了

相關文章
相關標籤/搜索