Curl Certificate Error when Using RVM to install Ruby 1.9.2

前端 未结 11 1488
太阳男子
太阳男子 2020-11-27 10:29

RVM is running into a certificate error when trying to download Ruby 1.9.2. It looks like curl is having a certificate issue but I am not sure how to bypass it

11条回答
  •  遥遥无期
    2020-11-27 10:40

    You need to download the ca certificate from http://curl.haxx.se/ca/cacert.pem and add them to your curl-ca-bundle-new.crt file.

    To find the location of this file use:

       $ curl-config --ca
    
       /usr/share/curl/curl-ca-bundle.crt
    

    Backup your curl-ca-bundle.crt file:

    $ cp /usr/share/curl/curl-ca-bundle.crt /usr/share/curl/curl-ca-bundle.crt.old
    

    Then you want to concatenate the two file using:

    $ cat cacert.pem /usr/share/curl/curl-ca-bundle.crt >> curl-ca-bundle-new.crt
    

提交回复
热议问题