I just installed Rstudio on Ubuntu 20.04 by following these instructions: https://linuxconfig.org/how-to-install-rstudio-on-ubuntu-20-04-focal-fossa-linux
However, I do not seem to be able to install any packages. I keep getting the following error, which seems to have something to do with pyenv and anaconda (I am mainly a python user). This doesn't make much sense to me. Can anyone help?
This is the error I get when I run install.packages("learnr"). It is very similar if I try installing any other package.
> install.packages("learnr") Installing package into ‘/home/brendan/R/x86_64-pc-linux-gnu-library/3.6’ (as ‘lib’ is unspecified) also installing the dependency ‘rappdirs’ trying URL 'https://cloud.r-project.org/src/contrib/rappdirs_0.3.3.tar.gz' Content type 'application/x-gzip' length 12288 bytes (12 KB) ================================================== downloaded 12 KB trying URL 'https://cloud.r-project.org/src/contrib/learnr_0.10.1.tar.gz' Content type 'application/x-gzip' length 1787789 bytes (1.7 MB) ================================================== downloaded 1.7 MB * installing *source* package ‘rappdirs’ ... ** package ‘rappdirs’ successfully unpacked and MD5 sums checked ** using staged installation ** libs gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-jbaK_j/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-jbaK_j/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c win-path.c -o win-path.o gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o rappdirs.so init.o win-path.o -L/usr/lib/R/lib -lR installing to /home/brendan/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-rappdirs/00new/rappdirs/libs ** R ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries pyenv: patchelf: command not found The `patchelf' command exists in these Python versions: anaconda3-2020.02 Note: See 'pyenv help global' for tips on allowing both python2 and python3 to be found. Error in system(paste("patchelf --print-rpath", shQuote(l)), intern = TRUE) : error in running command * removing ‘/home/brendan/R/x86_64-pc-linux-gnu-library/3.6/rappdirs’ Warning in install.packages : installation of package ‘rappdirs’ had non-zero exit status ERROR: dependency ‘rappdirs’ is not available for package ‘learnr’ * removing ‘/home/brendan/R/x86_64-pc-linux-gnu-library/3.6/learnr’ Warning in install.packages : installation of package ‘learnr’ had non-zero exit status
Thank you in advance!