Problem installing factoextra in RStudio 4.1.3 in Fedora 36, ''factoextra' had non-zero exit status'

Hello friends, I have a problem trying to install Factoextra that I have not been able to solve.

I have tried various options like: install.packages(“factoextra”, repos = “”)
…‘factoextra’ had non-zero exit status

Among others but none have worked for me, actually I have many problems when installing packages in RStudio. I have the same problem with ‘ggpubr’, ‘car’ which I have not been able to fix.
I had a similar problem installing Tidyverse which was fixed with some code in the terminal but for these packages I haven’t found a solution.
I read that for Ubunto you have to install a ppa to have access to all the packages in Cran. Is there something similar for Fedora?
Thank you very much in advance

Fedora not uses ppa, we do use copr for exotic or unsupported software by default.

Fedora Packages of R Software

Sorry, I already ran the codes in the terminal and apparently everything went well

$ sudo dnf install 'dnf-command(copr)'
$ sudo dnf copr enable iucar/cran
$ sudo dnf install R-CoprManager

but when executing


I keep getting the same error, is there anything else I should do? thanks

Finally I found the solution

Nothing to run commands or install more packages worked for me. The only thing that worked for me was this one function:

ipak <- function(pkg){
  new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
  if (length(new.pkg)) 
    install.packages(new.pkg, dependencies = TRUE)
  sapply(pkg, require, character.only = TRUE)
#the packages you want to install
packages <- c("ggpubr", "factoextra","NbClust","car")


I have no idea how it works but it works, here you can find more details

1 Like