问题
I happen to have Linux Mint on my machine (and I am not very experienced in Linux). When trying to install R packages (using install.packages()
) on Linux Mint, I've got the following problems:
- The installation process goes very slowly (the packages are being compiled each time)
- Some packages could not be installed due to compilation errors.
So, I wonder, is there any standard approach to install packages for Linux Mint?
回答1:
The repositories are available in any standard Ubuntu installation via the package manager. To get the latest version try adding cran.rstudio.com repository for Ubuntu:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/'
sudo apt-get update
sudo apt-get install r-base
(Details see R-Project homepage)
来源:https://stackoverflow.com/questions/49251944/whats-the-best-way-to-install-r-packages-on-linux