linux下,R包安装时退出状态为0


经常由于linux版本较低,R版本较高,安装最新的R包时候会出现退出时状态不是0,我安装一个sparklyr包,得到错误信息如下:

Warning messages:
1: In install.packages("sparklyr", dependencies = T) :
installation of package ‘Rcpp’ had non-zero exit status
2: In install.packages("sparklyr", dependencies = T) :
installation of package ‘curl’ had non-zero exit status
3: In install.packages("sparklyr", dependencies = T) :
installation of package ‘tibble’ had non-zero exit status
4: In install.packages("sparklyr", dependencies = T) :
installation of package ‘httr’ had non-zero exit status
5: In install.packages("sparklyr", dependencies = T) :
installation of package ‘testthat’ had non-zero exit status
6: In install.packages("sparklyr", dependencies = T) :
installation of package ‘dplyr’ had non-zero exit status
7: In install.packages("sparklyr", dependencies = T) :
installation of package ‘readr’ had non-zero exit status
8: In install.packages("sparklyr", dependencies = T) :
installation of package ‘sparklyr’ had non-zero exit status

在网上找了很久也没找到解决方案

后来我跑到R官网下载了旧版本的包curl_0.4.tar.gz,用以下命令进行安装:

R CMD INSTALL -l /home/wangxin/R/x86_64-redhat-linux-gnu-library/3.3 curl_0.4.tar.gz

居然就成功了

 

另外呢,还可以这样来,

install.packages("https://cran.r-project.org/src/contrib/Archive/curl/curl_0.9.tar.gz")

各种版本尝试一下就差不多了。。。

再安装主包。。。

install.packages("sparklyr",dependencies = TRUE)

 完美


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM