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