zoukankan      html  css  js  c++  java
  • 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协议了

  • 相关阅读:
    BouncyCastle 密钥转换
    java中公钥,私钥,pkcs1格式,pkcs8格式互转
    与非java语言使用RSA加解密遇到的问题:algid parse error, not a sequence
    RSA加解密时报algid parse error, not a sequence错误
    RSA算法原理(二)
    RSA算法原理(一)
    RSA加密的java实现---亲测
    Linux SSH和SFTP服务分离
    文件夹的rwx权限
    AMD 和 CMD 的区别有哪些?
  • 原文地址:https://www.cnblogs.com/whwywzhj/p/11981193.html
Copyright © 2011-2022 走看看