首页 > 解决方案 > 为什么 git2r 无法安装?

问题描述

当我尝试devtools在我的 Red Hat Linux 机器上通过 RStudio Server 安装 R 时,它失败了,因为它无法安装git2r. 当我然后尝试安装git2r时,它无法安装。

我认为这可能是因为我需要libssh2根据以下警告在我的 Linux 机器上安装。那是对的吗?如果是这样,那可以用yum install libssh2-develLinux 命令行中的 a 来纠正,对吗?不幸的是,我正在等待我的管理员给我sudo特权,所以我还不能检验这个假设。

configure: WARNING:
  ---------------------------------------------
   Unable to find the LibSSH2 library on this
   system. Building a version without support
   for SSH transport.

   To build with SSH support, please install:
     libssh2-1-dev (package on e.g. Debian and Ubuntu)
     libssh2-devel (package on e.g. Fedora, CentOS and RHEL)
     libssh2 (Homebrew package on OS X)
   and try again.

   If the LibSSH2 library is installed on
   your system but the git2r configuration
   is unable to find it, you can specify
   the include and lib path to LibSSH2 with:
   R CMD INSTALL git2r --configure-vars='LIBS=-L/path/to/libs CPPFLAGS=-I/path/to/headers'
  ---------------------------------------------

在失败的安装输出的末尾还有一个警告,提到libssl. 这与libssh2或单独的问题有关吗?如果分开,我将如何解决?有libssl我应该安装的库吗?

Error: package or namespace load failed for ‘git2r’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/jp7663/R/x86_64-redhat-linux-gnu-library/3.4/git2r/libs/git2r.so':
  libssl.so.1.0.0: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/jp7663/R/x86_64-redhat-linux-gnu-library/3.4/git2r’
Warning in install.packages :
  installation of package ‘git2r’ had non-zero exit status

标签: rdevtoolslibssh2libssl

解决方案


推荐阅读