2016-02-26 91 views
2

我在Linux mint 17.3 64位中使用R版本3.2.3。我試圖用dependencies=TRUE安裝包「車」,但安裝失敗,出現以下錯誤信息:無法安裝包車

> warnings() 
Warning messages: 
1: In install.packages("car", dependencies = T) : 
installation of package ‘minqa’ had non-zero exit status 
2: In install.packages("car", dependencies = T) : 
installation of package ‘RcppEigen’ had non-zero exit status 
3: In install.packages("car", dependencies = T) : 
installation of package ‘leaps’ had non-zero exit status 
4: In install.packages("car", dependencies = T) : 
installation of package ‘lmtest’ had non-zero exit status 
5: In install.packages("car", dependencies = T) : 
installation of package ‘rgl’ had non-zero exit status 
6: In install.packages("car", dependencies = T) : 
installation of package ‘SparseM’ had non-zero exit status 
7: In install.packages("car", dependencies = T) : 
installation of package ‘quantreg’ had non-zero exit status 
8: In install.packages("car", dependencies = T) : 
installation of package ‘lme4’ had non-zero exit status 
9: In install.packages("car", dependencies = T) : 
installation of package ‘effects’ had non-zero exit status 
10: In install.packages("car", dependencies = T) : 
installation of package ‘pbkrtest’ had non-zero exit status 
11: In install.packages("car", dependencies = T) : 
installation of package ‘car’ had non-zero exit status 
12: In install.packages("car", dependencies = T) : 
installation of package ‘alr4’ had non-zero exit status 

如何解決這個問題?請幫忙。

+0

這裏的答案可能會解釋你的錯誤:[「安裝包'FILE_PATH'具有非零退出狀態」in R](http://stackoverflow.com/a/27894019/3560695) – Therkel

+0

試圖手動安裝依賴包在install.packages(「minqa」)之前已經爲我工作了,然後繼續下去,直到所有依賴關係安裝完成。 –

+0

安裝包「minqa」本身也是錯誤的。 –

回答

3

我終於找到了解決方案。查看安裝「minqa」的錯誤消息後,我意識到安裝程序無法找到gfortran。於是我安裝了gfortran,然後再次嘗試安裝「汽車」。這次我收到另一個錯誤信息,說沒有找到-llapack -lblas。因此,根據此鏈接:/usr/bin/ld: cannot find -llapack 我安裝了軟件包「liblapack-dev」,「liblapack3」,「libopenblas-base」和「libopenblas-dev」。之後,「汽車」包成功安裝。

1

安裝上r-cran車

在Ubuntu 16.04安裝上r-cran車載封裝(Xenial Xerus)是作爲終端運行下面​​的命令一樣簡單:

sudo易於得到更新

sudo apt-get install r-cran-car

3

我有同樣的問題。就我而言,在我的機器上安裝gcc-fortran就足夠了。

+0

這對我在Manjaro工作。簡單。 – haff