經常由於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)
完美