无法在R中安装插入符号软件包(在我的Linux机器中) [英] Can't install the caret package in R (in my Linux machine)

查看:128
本文介绍了无法在R中安装插入符号软件包(在我的Linux机器中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在R中安装脱字号软件包时遇到以下错误.

I am facing the following errors while trying to install the caret package in R.

     g++: error: /tmp/Rtmp2Tos7n/R.INSTALL2e6e30153a74/nloptr/nlopt-2.4.2/lib/libnlopt_cxx.a: 
No such file or directory make: *** [nloptr.so] Error 1

    ERROR: compilation failed for package ‘nloptr’
    * removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/nloptr’
    Warning in install.packages :
      installation of package ‘nloptr’ had non-zero exit status
    ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
    * removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/lme4’
    Warning in install.packages :
      installation of package ‘lme4’ had non-zero exit status
    ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
    * removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/pbkrtest’
    Warning in install.packages :
      installation of package ‘pbkrtest’ had non-zero exit status
    ERROR: dependency ‘lme4’ is not available for package ‘BradleyTerry2’
    * removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/BradleyTerry2’
    Warning in install.packages :
      installation of package ‘BradleyTerry2’ had non-zero exit status
    ERROR: dependency ‘pbkrtest’ is not available for package ‘car’
    * removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/car’
    Warning in install.packages :
      installation of package ‘car’ had non-zero exit status
    ERROR: dependencies ‘car’, ‘BradleyTerry2’ are not available for package ‘caret’
    * removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/caret’
    Warning in install.packages :
      installation of package ‘caret’ had non-zero exit status

    The downloaded source packages are in
        ‘/tmp/RtmpG9dYqn/downloaded_packages’

我调查了另一个存在类似问题的问题

I looked into this other question that had a similar problem

在R中安装脱字符包时的依赖性问题

此问题的解决方案是先安装每个依赖项,但是它们都具有相同的错误消息.例如:

The solution for this problem was to install each of the dependencies first, but they all had the same error message. For example:

>install.packages('nloptr')

g++: error: /tmp/RtmpgEn54A/R.INSTALL7015350f0d03/nloptr/nlopt-2.4.2/lib/libnlopt_cxx.a: No such file or directory
make: *** [nloptr.so] Error 1
ERROR: compilation failed for package ‘nloptr’
* removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/nloptr’
Warning in install.packages :
  installation of package ‘nloptr’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpG9dYqn/downloaded_packages’

我也尝试更改repos即. install.packages('caret', repos='http://cran.rstudio.com/')但它也可以工作.

I also tried changing the repos ie. install.packages('caret', repos='http://cran.rstudio.com/') but it dint work either.

我的会话信息如下:

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-suse-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.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

很高兴有人能帮忙!

谢谢:)

推荐答案

我希望先添加评论. 2015年1月28日,在github中的nloptr软件包中有一个添加汇编.我使用一种变通方法,方法是使用命令从较早版本安装

I was hoping to add a comment first. On Jan 28, 2015, there was an addition to the nloptr package in github that possibly broke the compilation. I used a workaround by installing from an older version with the command

install.packages("http://cran.r-project.org/src/contrib/Archive/nloptr/nloptr_1.0.0.tar.gz",
                 repos=NULL, type="source")

这篇关于无法在R中安装插入符号软件包(在我的Linux机器中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆