• 安装CURL 时报错GnuTLS: The TLS connection was nonproperly terminated. Unable to establish SSL connection.


    安装curl报错 Unable to establish SSL connection

    [root@rzk curl]# wget https://curl.haxx.se/download/curl-7.54.0.tar.gz
    --2021-11-25 16:47:14--  https://curl.haxx.se/download/curl-7.54.0.tar.gz
    Resolving curl.haxx.se (curl.haxx.se)... 151.101.230.49, 2a04:4e42:11::561
    Connecting to curl.haxx.se (curl.haxx.se)|151.101.230.49|:443... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: https://curl.se/download/curl-7.54.0.tar.gz [following]
    --2021-11-25 16:47:15--  https://curl.se/download/curl-7.54.0.tar.gz
    Resolving curl.se (curl.se)... 151.101.194.49, 151.101.2.49, 151.101.66.49, ...
    Connecting to curl.se (curl.se)|151.101.194.49|:443... connected.
    GnuTLS: The TLS connection was non-properly terminated.
    Unable to establish SSL connection.
    

    解决办法

    vim进入本机dns配置 vim /etc/resolv.conf

    添加阿里的dns

    nameserver  223.5.5.5
    nameserver  223.6.6.6
    

    然后重新下载即可

    安装curl

    下载curl包,地址https://curl.haxx.se/download/

    wget https://curl.haxx.se/download/curl-7.59.0.tar.gz

    解压缩

    tar -xzvf curl-7.59.0.tar.gz

    进入安装目录

    cd curl-7.59.0

    编译

    ./configure

    make && make install

    查看版本

    [root@rzk curl-7.54.0]# curl --version
    curl 7.54.0 (x86_64-pc-linux-gnu) libcurl/7.54.0 OpenSSL/1.1.1g zlib/1.2.11
    Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

  • 相关阅读:
    数据库拉取附件到本地
    Https工具类
    AES加密算法
    DES加密算法
    Http工具类,Lz提供
    接口调用工具类
    autofac生命周期入门(如何避免内存泄漏)
    ASP.NET异步
    Global Error Handling in ASP.NET Web API 2(webapi2 中的全局异常处理)
    ado.net EF学习系列----深入理解查询延迟加载技术(转载)
  • 原文地址:https://www.cnblogs.com/rzkwz/p/15603509.html
Copyright © 2020-2023  润新知