【问题标题】:Error: Unable to install R package from private SVN server错误:无法从私有 SVN 服务器安装 R 包
【发布时间】:2018-09-25 19:15:36
【问题描述】:

在我的 Windows 10 机器 (x64) 上,我正在尝试使用 here 给出的说明从我们的私有 SVN 服务器(Visual SVN 服务器)安装 R 包(在 R Studio 内)。服务器具有自签名证书。要安装软件包,我正在运行以下命令:

install.packages("https://~path_to_private_SVN/trunk", repos = NULL, type = "source", method="curl", extra = "--user my_username:my_password")

我收到此错误消息:

 Installing package into ‘path_to_R_library/3.5’
    (as ‘lib’ is unspecified)
    % Total    % Received % Xferd  Average Speed   Time    Time     Time Current
                                 Dload  Upload   Total   Spent    Left  Speed
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://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.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
Error in download.file(p, destfile, method, mode = "wb", ...) : 
  'curl' call had nonzero exit status

显然,R Studio 对 SVN 服务器证书问题不满意,我无法安装 R 包。但是,目前,我想忽略 SVN 服务器的这个证书错误问题。有没有办法告诉install.packages() 不要为这个SVN 主机执行SSL certificate verification?我知道安装R 软件包的另一个选项可能是devtools::install_svn()

【问题讨论】:

    标签: r curl ssl-certificate visualsvn-server r-package


    【解决方案1】:

    服务器的证书有问题,它不受信任。您问题中的错误消息指定了解决步骤和解决方法。例如,您可以在curl 中禁用证书验证:

    如果您想关闭 curl 对证书的验证,请使用 -k(或 --insecure)选项。

    有关在服务器上设置服务器证书的信息,请参阅KB134: Configuring SSL Certificates for VisualSVN Server

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-28
      • 1970-01-01
      • 2012-04-25
      • 2017-12-03
      • 1970-01-01
      • 2015-10-22
      • 2013-12-12
      • 2015-12-16
      相关资源
      最近更新 更多