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

  • 相关阅读:
    日常脚本练习与解释
    第五周作业
    centos 7中命令记录
    centos7 中如何查看、打开、关闭防火墙。
    第四周
    复制/etc/profile至/tmp/目录,用查找替换命令删除/tmp/profile文件中的 行首的空白字符
    vim中设置tab缩进为4个字符
    Linux上的文件管理类命令都有哪些,其常用的使用方法及其相关示例演示。
    sql 索引笔记--索引组织结构
    sql 索引笔记2
  • 原文地址:https://www.cnblogs.com/whwywzhj/p/11981193.html
Copyright © 2011-2022 走看看