【问题标题】:Can't install git2r nor devtools R packages on centOS 7.0 64 bit无法在 centOS 7.0 64 位上安装 git2r 或 devtools R 软件包
【发布时间】:2015-08-04 08:24:39
【问题描述】:

我在 centOS 下安装 R 软件包失败。我正在尝试安装devtools 包以安装具有install_github 功能的rstudio/DT 包,但是当我尝试安装devtools 包时,我收到git2r 包无法安装的以下错误已安装。有人可能知道我应该怎么做才能成功执行安装吗?

我的代码和错误以及sessionInfo 如下:

also installing the dependency ‘git2r’

próbowanie adresu URL 'http://r.meteo.uni.wroc.pl/src/contrib/git2r_0.10.1.tar.gz'
Content type 'application/x-gzip' length 1014817 bytes (991 Kb)
otwarty adres URL
==================================================
downloaded 991 Kb

próbowanie adresu URL 'http://r.meteo.uni.wroc.pl/src/contrib/devtools_1.8.0.tar.gz'
Content type 'application/x-gzip' length 141487 bytes (138 Kb)
otwarty adres URL
==================================================
downloaded 138 Kb

* installing *source* package ‘git2r’ ...
** pakiet ‘git2r’ został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing inflate... -lz
checking for library containing SSL_library_init... no
configure: error: in `/tmp/Rtmpu69dSw/R.INSTALL78eb79d3960d/git2r':
configure: error: OpenSSL library required
See `config.log' for more details
ERROR: configuration failed for package ‘git2r’
* removing ‘/usr/lib64/R/library/git2r’
ERROR: dependency ‘git2r’ is not available for package ‘devtools’
* removing ‘/usr/lib64/R/library/devtools’

Pobrane pakiety źródłowe są w
    ‘/tmp/RtmpPa6Dam/downloaded_packages’
Aktualizowanie indeksu HTML pakietów w '.Library'
Making 'packages.html' ... wykonano
Komunikaty ostrzegawcze:
1: In install.packages("devtools") :
  instalacja pakietu ‘git2r’ miała niezerowy status wyjścia
2: In install.packages("devtools") :
  instalacja pakietu ‘devtools’ miała niezerowy status wyjścia
> install.packages("git2r")
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
próbowanie adresu URL 'http://r.meteo.uni.wroc.pl/src/contrib/git2r_0.10.1.tar.gz'
Content type 'application/x-gzip' length 1014817 bytes (991 Kb)
otwarty adres URL
==================================================
downloaded 991 Kb

* installing *source* package ‘git2r’ ...
** pakiet ‘git2r’ został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing inflate... -lz
checking for library containing SSL_library_init... no
configure: error: in `/tmp/Rtmp7XPNF2/R.INSTALL7a40466f8127/git2r':
configure: error: OpenSSL library required
See `config.log' for more details
ERROR: configuration failed for package ‘git2r’
* removing ‘/usr/lib64/R/library/git2r’

Pobrane pakiety źródłowe są w
    ‘/tmp/RtmpPa6Dam/downloaded_packages’
Aktualizowanie indeksu HTML pakietów w '.Library'
Making 'packages.html' ... wykonano
Komunikat ostrzegawczy:
In install.packages("git2r") :
  instalacja pakietu ‘git2r’ miała niezerowy status wyjścia
> sessionInfo(
+ )
R version 3.1.2 (2014-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=pl_PL.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=pl_PL.UTF-8        LC_COLLATE=pl_PL.UTF-8    
 [5] LC_MONETARY=pl_PL.UTF-8    LC_MESSAGES=pl_PL.UTF-8   
 [7] LC_PAPER=pl_PL.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=pl_PL.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.1.2

【问题讨论】:

  • 提示:configure: error: OpenSSL library required。如果你有管理员权限,你应该试试yum install openssl
  • 1:openssl-1.0.1e-42.el7.4.x86_64 is already installed ;/
  • 我仍然有同样的错误。我对centOS不是很熟悉
  • 您是否安装了标头? yum install openssl-devel
  • 我已经安装了 openSSL,但是安装 libssh2-devel (yum install libssh2-devel) 解决了这个问题。然而,为了在 centOS 上成功编译,我必须以 root 身份运行 R:sudo R

标签: r centos centos7 devtools


【解决方案1】:

我在 red hat 上遇到了同样的问题。解决方案是(感谢@Pascal)安装 openssl-devel

yum install openssl-devel

【讨论】:

  • 在 Fedora 25 上还不够!正如@Dave 所提到的,您还需要libssh2-devel 和其他一些libX-devel,例如curl。此外,R 中的安装命令需要 root 权限,因此必须使用来自终端的 sudo R 而不是只是 R
【解决方案2】:

安装openssl依赖后在Linux mint Sarah中解决:

$ sudo apt-get install libssl-dev

【讨论】:

    猜你喜欢
    • 2016-10-15
    • 1970-01-01
    • 2020-05-23
    • 1970-01-01
    • 2016-08-05
    • 2018-09-16
    • 2019-05-17
    • 1970-01-01
    • 2020-01-02
    相关资源
    最近更新 更多