Unable to install package car
Asked Answered
J

5

7

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.

Justin answered 26/2, 2016 at 9:14 Comment(6)
The answer here may explain your error: “installation of package 'FILE_PATH' had non-zero exit status” in RRepublicanism
trying to manually install the dependent packages has worked for me before install.packages("minqa") and then go down the line until all dependencies have been installed.Autorotation
Installation of the package "minqa" itself is also giving error.Justin
What kind of error? The one with an error message?Rorke
* installing *source* package ‘minqa’ ... ** package ‘minqa’ successfully unpacked and MD5 sums checked ** libs gfortran -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -c altmov.f -o altmov.o /bin/bash: gfortran: command not found make: *** [altmov.o] Error 127 ERROR: compilation failed for package ‘minqa’ * removing ‘/home/bishwarup/R/x86_64-pc-linux-gnu-library/3.2/minqa’ Warning in install.packages : installation of package ‘minqa’ had non-zero exit statusJustin
Ubuntu 22.04 and RStudio 4.2.1 (as of October 2022) and NO solution below works.Microcrystalline
J
11

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.

Justin answered 26/2, 2016 at 11:30 Comment(0)
R
7

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

Rathskeller answered 7/7, 2017 at 12:39 Comment(0)
C
3

I had the same issue. In my case it was enough to install gcc-fortran on my machine.

Complement answered 18/10, 2017 at 16:21 Comment(0)
C
1

If you are using Anaconda, consider installing the gfortran package via conda. For example, on Mac:

conda install -c anaconda gfortran_osx-64 
Contaminate answered 26/3, 2018 at 6:10 Comment(0)
A
0

When browsing through the output of install.packages("car"), I had the next error messages:

/bin/bash: gfortran: command not found
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas

After added the related packages to my Ubuntu system, everything worked fine.

sudo apt-get install gfortran liblapack-dev libblas-dev
Aman answered 14/4, 2020 at 15:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.