Please are there any hints on why I am not able to install any R packages? I recently installed the Ubuntu 20.04 LTS OS as well as R and R studio. I am however not able to install any packages in R. I have gone through a seemingly related post such as Cannot install any R packages on Ubuntu 18.04 but the solutions appear not to help in my case. For instance, while trying to install the ggplot2 package, I get reports that various dependencies are not installed, but trying to install any one of them does not work at all. I will be grateful for any suggestions.
I have added here the last of the error statements and R session info after trying to install the ggplot2 package, as well as the outputs when I run the commands R --version
and apt-cache policy r-base-dev
:
install.packages("ggplot2")
* removing ‘/home/power/R/x86_64-pc-linux-gnu-library/4.1/tibble’
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
ERROR: dependencies ‘digest’, ‘glue’, ‘isoband’, ‘rlang’, ‘scales’, ‘tibble’ are not available for package ‘ggplot2’
* removing ‘/home/power/R/x86_64-pc-linux-gnu-library/4.1/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0
(base) power@power-SYS-7039A-I:~$ R --version
R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.
(base) power@power-SYS-7039A-I:~$ apt-cache policy r-base-dev
r-base-dev:
Installed: 4.1.0-1.2004.0
Candidate: 4.1.0-1.2004.0
Version table:
*** 4.1.0-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
100 /var/lib/dpkg/status
4.0.5-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
4.0.4-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
4.0.3-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
4.0.2-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
4.0.1-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
4.0.0-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ Packages
3.6.3-2 500
500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
500 http://de.archive.ubuntu.com/ubuntu focal/universe i386 Packages
(base) power@power-SYS-7039A-I:~$