3

Hi I am using R (and RStudio in Ubuntu) I am having the following issue.

I use the line of code:

install.packages("factoextra")

During the installation I get the message:

install.packages("factoextra")
Installing package into ‘/home/martinandrade/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)

Warning in install.packages :
  dependencies ‘FactoMineR’, ‘cowplot’ are not available
also installing the dependency ‘ggpubr’

trying URL 'https://cloud.r-project.org/src/contrib/ggpubr_0.2.4.tar.gz'
Content type 'application/x-gzip' length 2665439 bytes (2.5 MB)
==================================================
downloaded 2.5 MB

trying URL 'https://cloud.r-project.org/src/contrib/factoextra_1.0.5.tar.gz'
Content type 'application/x-gzip' length 1390733 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

ERROR: dependency ‘cowplot’ is not available for package ‘ggpubr’
* removing ‘/home/martinandrade/R/x86_64-pc-linux-gnu-library/3.4/ggpubr’
Warning in install.packages :
  installation of package ‘ggpubr’ had non-zero exit status
ERROR: dependencies ‘FactoMineR’, ‘ggpubr’ are not available for package ‘factoextra’
* removing ‘/home/martinandrade/R/x86_64-pc-linux-gnu-library/3.4/factoextra’
Warning in install.packages :
  installation of package ‘factoextra’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpsKLn56/downloaded_packages’

Which then produces an error message when I load the package

library("factoextra")

Error in library("factoextra") : there is no package called ‘factoextra’

UseR10085
  • 7,120
  • 3
  • 24
  • 54
martinandrade
  • 31
  • 1
  • 1
  • 4
  • 1
    Hi martinandrade, welcome to StackOverflow! Have you looked at the question here: https://stackoverflow.com/questions/27893230/installation-of-package-file-path-had-non-zero-exit-status-in-r? And what is the specific error message from the installation. The `library("factoextra")` is failing because the package is failing to be installed properly, so it cannot be loaded. – Brydenr Nov 26 '19 at 16:29
  • martinandrade, there are likely more errors/warnings/messages in between your attempt to install and the *"non-zero exit status"*. There are many reasons why it may fail, and while it might be a "known thing" to somebody, I think it's more likely that nobody will know for sure with what little we see here. Please include all of the error/warning/message text that occurs when you try to install it. It might be necessary to know your OS and version of R, too, both provided in the output from `sessionInfo()`. (And please: https://stackoverflow.com/editing-help#syntax-highlighting) – r2evans Nov 26 '19 at 16:31
  • Hi, I just edited the output. Could you help me editing the question? Thank you – martinandrade Nov 26 '19 at 16:38

5 Answers5

3

For the "car" package, you can install it with this command (on linux ubuntu):

1) sudo apt-get update

2) sudo apt-get install r-cran-car

Fifou
  • 31
  • 2
1

Both cowplot and FactoMineR require R >= 3.5.0, while you seem to be using R version 3.4.0. One possible solution would be to use an up-to-date R from CRAN. Alternatively, you could update to Ubuntu 19.10, which also brings an up-to-date R. If both are not possible, you can try to install older versions of the required packages, e.g. from an older MRAN snapshot or with remotes::install_version().

Ralf Stubner
  • 26,263
  • 3
  • 40
  • 75
1

If you're using ubuntu, just follow this link https://ubuntu.pkgs.org/21.10/ubuntu-universe-arm64/r-cran-factoextra_1.0.7-2_all.deb.html. Download deb file then install on ubuntu. No need install.package from R environment. For me it works successfully.

ndhol
  • 11
  • 1
0

You can install old version of cowplot. Here is a link: https://cran.r-project.org/src/contrib/Archive/cowplot/ and old version of FactoMineR for R version < 3.5.0. Here is the link: https://cran.r-project.org/src/contrib/Archive/FactoMineR/

Fifou
  • 31
  • 2
0

If you're still looking for an answer, check that the package libcurl4-openssl-dev is installed on your system.

That was the missing piece for me.

TomsHL
  • 1
  • 2