1. 程式人生 > >Ubuntu環境R程式包安裝返回非零值的一個解決辦法

Ubuntu環境R程式包安裝返回非零值的一個解決辦法

做迴歸分析的作業,需要用到car程式包,然而在Rstudio中一直沒能成功安裝,最後在StackOverFlow中看到一種解決方法,成功解決問題。

原問題是安裝ncdf4程式包,將它換成相應的程式包即可。如果有其他解決方法,歡迎補充。

'ncdf4' require system libraries be installed, so you have a couple of options:

      1. Install the pre-built 'ncdf4' package from the repositories:

sudo apt-get install r-cran-ncdf4

This will automatically pull in the required system dependencies.

2. Or, you can install the system dependencies explicitly:

sudo apt-get install netcdf-bin

Then, install the R package:

install.packages('ncdf4')

原問題網址