Warning in install.packages :
installation of package ‘googledrive’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘gargle’, ‘googledrive’, ‘httr’, ‘ids’ are not available for package ‘googlesheets4’
* removing ‘/home/lanewhitten/R/x86_64-redhat-linux-gnu-library/4.0/googlesheets4’
Warning in install.packages :
installation of package ‘googlesheets4’ had non-zero exit status
ERROR: dependencies ‘googledrive’, ‘googlesheets4’, ‘httr’, ‘rvest’ are not available for package ‘tidyverse’
* removing ‘/home/lanewhitten/R/x86_64-redhat-linux-gnu-library/4.0/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpxCRrL7/downloaded_packages’
That is the tail of my error messages. Ive already installed curl on fedora using
sudo dnf install curl
I am at a total loss as to how to resolve this and switching operating systems or running a virtual machine is not an option for me.
Unfortunately, CRAN does not provide binaries for Linux. That is why, by default install.packages()
will compile any package you install from source. Many packages require developer libraries to be installed on the system for compilation. The lack of these packages is why you got the error.
Overall, compiling packages yourself is far from ideal. All packages will take a longer time to install. Especially when you do them infrequently, updates will take an eternity. Also, finding out which system developer packages to install alongside can be time consuming as well, particularly for beginners.
Luckily, there is a COPR repository for Fedora that provides up-to-date binaries for all CRAN packages. All you have to do is run these few lines in the system terminal (not R console):
sudo dnf install 'dnf-command(copr)'
sudo dnf copr enable iucar/cran
sudo dnf install R-CoprManager
Afterwards install.packages()
in R will install the desired packages through the system package manager. This also means that you will receive R package updates whenever you run dnf update
or update the system with your desktop environments software management GUI.
You can find further documentation about this on the CRAN website.
If you are using R, you probably want RStudio as well. Starting with Fedora 41, RStudio is no longer available via Fedora repos. That is because RStudio switched from Qt to Electron. Luckily, the same author that made the CRAN COPR repo also provides one for RStudio:
sudo dnf copr enable iucar/rstudio
sudo dnf install rstudio-desktop