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协议了

相关文章
相关标签/搜索