Unable to install any R package in Rstudio - OS Linux

I am unable to install any R package in Rstudio. I have tried several options I found online but no success so far.

Bellow you can find part of the output I got when I'm trying install ggplot.

ERROR: dependencies ‘ellipsis’, ‘digest’, ‘glue’, ‘rlang’ are not available for package ‘vctrs’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/vctrs’
Warning in install.packages :
  installation of package ‘vctrs’ had non-zero exit status
ERROR: dependencies ‘farver’, ‘lifecycle’, ‘munsell’ are not available for package ‘scales’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/scales’
Warning in install.packages :
  installation of package ‘scales’ had non-zero exit status
ERROR: dependencies ‘callr’, ‘cli’, ‘desc’, ‘rprojroot’ are not available for package ‘pkgbuild’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/pkgbuild’
Warning in install.packages :
  installation of package ‘pkgbuild’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘fansi’, ‘rlang’, ‘utf8’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/pillar’
Warning in install.packages :
  installation of package ‘pillar’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘desc’, ‘pkgbuild’, ‘rlang’, ‘rprojroot’ are not available for package ‘pkgload’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/pkgload’
Warning in install.packages :
  installation of package ‘pkgload’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘ellipsis’, ‘fansi’, ‘lifecycle’, ‘pillar’, ‘rlang’, ‘vctrs’ are not available for package ‘tibble’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/tibble’
Warning in install.packages :
  installation of package ‘tibble’ had non-zero exit status
ERROR: dependencies ‘cli’, ‘digest’, ‘ellipsis’, ‘pkgload’, ‘rlang’ are not available for package ‘testthat’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/testthat’
Warning in install.packages :
  installation of package ‘testthat’ had non-zero exit status
ERROR: dependencies ‘Rcpp’, ‘testthat’ are not available for package ‘isoband’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/isoband’
Warning in install.packages :
  installation of package ‘isoband’ had non-zero exit status
ERROR: dependencies ‘digest’, ‘glue’, ‘isoband’, ‘rlang’, ‘scales’, ‘tibble’ are not available for package ‘ggplot2’
* removing ‘/home/lfs/R/x86_64-pc-linux-gnu-library/3.4/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status

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

Thanks

  1. When did you first notice this problem?
  2. Which distribution of Linux do you run?
  3. Is this a brand new clean and fresh installation of Linux?
  4. What was the process you followed to install base R and RStudio?

I am on Ubuntu 20.04 and I had a similar issue earlier this week when trying to install some packages. I found that when I followed the rabbit hole into the missing dependencies listed for each package in the error message, I was able to successfully install the package.

Since the most recent ubuntu update, this issue has not come up again for me.

1 Like
  1. When did you first notice this problem?
    A couple of days ago
  2. Which distribution of Linux do you run?
    Linux Mint 19.3
  3. Is this a brand new clean and fresh installation of Linux?
    Yes it is, Early this week I installed Linux in a workstation Dell Precision T3600
  4. What was the process you followed to install base R and RStudio?
    I installed R version 3.4.4 by typing

sudo apt install r-base

 And Rstudio by typing

sudo apt-get install gdebi-core
sudo gdebi rstudio-1.3.959-amd64.deb

1 Like

I tried something similar but it is a super long process because I need to install a lot of packages and some dependencies cannot be installed because they need need other dependencies, and so on. I have used Rstudio in previous versions of Linux Mint and I never had that issue before. I mean, when I installed the packages I needed, their dependencies where automatically installed.

I wondering is there is a way to install some libraries that fix this issue! I have tried to install some updates I found in the web but the only thing I got was to messing up other components of the OS.

Can you provide a specific example (library) and the whole error message you get? Also, you are using a very old version, I would recommend updating to the latest R version (I think you can do it following the Ubuntu guide since Mint is based on Ubuntu).

https://cran.r-project.org/bin/linux/ubuntu/

1 Like

Yeah, that solved my issue. By using the latest version of R I was able to install all needed packages.

Thanks

1 Like

For those of you who are looking for more detailed instructions on how to install or update R and Rstudio on your Linux computer, these instructions by Digital Ocean will work for Debian based distributions (like Ubuntu and Mint). I used these instructions to update Rstudio on my machine running Xubuntu 18.04 because I too was running very old versions.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.