curl报CA证书错误
  C7GElnmfNnFj 2023年11月02日 211 0

尝试安装

rclone:sudo -v ; curl https://rclone.org/install.sh | sudo bash

提示如下错误:

curl: (60) SSL certificate problem: certificate has expired

More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"  of Certificate Authority (CA) public keys (CA certs).

If the default  bundle file isn't adequate, you can specify an alternate file  using the --cacert option.

If this HTTPS server uses a certificate signed by a CA represented in  the bundle, the certificate verification probably failed due to a  problem with the certificate (it might be expired, or the name might  not match the domain name in the URL).

If you'd like to turn off curl's verification of the certificate, use  the -k (or --insecure) option.

开始时以为是证书问题,后来查询后才明白是curl版本太旧了,主机是ubuntu server 16.04,curl版本是7.40

因此尝试升级curl,但是碍于OS 16.04,一直提示已经是最新版,因此只好采用手动升级,具体步骤如下:

Step 1 : Remove the currently installed curl if installed:

sudo apt remove curl

sudo apt purge curl


Step 2 : Install the tools to compile this release and curl dependencies:

sudo apt-get update

sudo apt-get install -y libssl-dev autoconf libtool make


Step 3 : Download and install the latest release from http://curl.haxx.se/download.html. Run this commands one by one in ssh terminal:

cd /usr/local/src

rm -rf curl*

wget https://curl.haxx.se/download/curl-7.70.0.zip

unzip curl-7.70.0.zip


Compile : cd curl-7.70.0     #选择对应的版本号#

./buildconf

./configure --with-ssl

make

make install


Step 4 : Update the system’s binaries and symbol lookup (which libcurl your curl loads):

mv /usr/bin/curl /usr/bin/curl.bak

cp /usr/local/bin/curl /usr/bin/curl

完成后可通过 curl -V 查看版本

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

上一篇: Linux配置JDK1.5 下一篇: Linux命令(44)之kill
  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  2ohPpChXORY6   2023年11月02日   70   0   0 HTTPS
  C7GElnmfNnFj   2023年11月02日   212   0   0 HTTPScacurl
  EeGZtZT5Jsfk   2023年11月13日   30   0   0 请求头jsoncurl
  cn1fZ0eQuQF9   2023年11月30日   61   0   0 curl
  wwLZeziuqjLR   2023年11月02日   49   0   0 百度htmlHTTPcurl