Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install package car

I am using R version 3.2.3 in Linux mint 17.3 64 bit. I was trying to install the package "car" with dependencies=TRUE, but the installation failed with the following error messages:

> 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

How do I resolve the issue? Please help.

like image 490
Bishwarup Paul Avatar asked Feb 26 '16 09:02

Bishwarup Paul


People also ask

How do I install car packages in R?

R version of car The help files for car (which are part of the package) may also be viewed on CRAN. With an active Internet connection, entering the command install. packages("car", dependencies=TRUE) in R will install the package. (You'll be asked to select a CRAN mirror; pick one near you.)

What is an install package?

An installation package contains all of the information that the Windows Installer requires to install or uninstall an application or product and to run the setup user interface.

What is the car package in R?

“car”, the name of the package, is an acronym for Companion to Applied Regression. This package isn't used to perform Applied Regression techniques, it compliments these techniques by providing numerous functions that perform tests, creates visualizations, and transform data.


2 Answers

I finally found the solution. After looking at the error message for installing "minqa", I realized that the installer was unable to find gfortran. So I installed gfortran,then tried to install "car" again. This time I got another error message saying that -llapack -lblas were not found. Therefore, according to this link: /usr/bin/ld: cannot find -llapack I installed packages "liblapack-dev", "liblapack3", "libopenblas-base" and "libopenblas-dev". After that, the "car" package was successfully installed.

like image 98
Bishwarup Paul Avatar answered Oct 02 '22 14:10

Bishwarup Paul


Install r-cran-car

Installing r-cran-car package on Ubuntu 16.04 (Xenial Xerus) is as easy as running the following command on terminal:

sudo apt-get update

sudo apt-get install r-cran-car

like image 35
Laban Avatar answered Oct 02 '22 13:10

Laban