Using an R studio server built on University GPU – Package installation stops and prompts resulting in a non zero exit status

I have been using a GPU hosted RStudio server to conduct a bunch of analyses. Whilst I was able to install a few packages and run them, however, for some other packages despite installation – they result in a non zero exit. I have not been able to figure out what is causing this issue. I tried multiple ways to install them with zero success. It is something new to me and I frankly am not even sure what and where to look for solutions on the internet. Could someone let me know how to conduct a diagnostic and understand what’s causing the issue? Thanks in advance

The following error pops up when I try to install something as basic as Tidyverse

Would appreciate some feedback as am totally new to using R on a GPU hosted server

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
--------------------------- [ANTICONF] --------------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars="INCLUDE_DIR=... LIB_DIR=..."
-------------------------- [ERROR MESSAGE] ---------------------------
:1:10: fatal error: curl/curl.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status
* installing *source* package ‘systemfonts’ ...
** package ‘systemfonts’ successfully unpacked and MD5 sums checked
** using staged installation
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfontconfig -lfreetype
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the fontconfig freetype2 library. Try installing:
 * deb: libfontconfig1-dev (Debian, Ubuntu, etc)
 * rpm: fontconfig-devel (Fedora, EPEL)
 * csw: fontconfig_dev (Solaris)
 * brew: freetype (OSX)
If fontconfig freetype2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a fontconfig freetype2.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars="INCLUDE_DIR=... LIB_DIR=..."
-------------------------- [ERROR MESSAGE] ---------------------------
:1:10: fatal error: fontconfig/fontconfig.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘systemfonts’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/systemfonts’
Warning in install.packages :
  installation of package ‘systemfonts’ had non-zero exit status
ERROR: failed to lock directory ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1’ for modifying
Try removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-stringi’
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
** using staged installation
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lxml2
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libxml-2.0 was not found. Try installing:
 * deb: libxml2-dev (Debian, Ubuntu, etc)
 * rpm: libxml2-devel (Fedora, CentOS, RHEL)
 * csw: libxml2_dev (Solaris)
If libxml-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libxml-2.0.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars="INCLUDE_DIR=... LIB_DIR=..."
--------------------------------------------------------------------
ERROR: configuration failed for package ‘xml2’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/xml2’
Warning in install.packages :
  installation of package ‘xml2’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘textshaping’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/textshaping’
Warning in install.packages :
  installation of package ‘textshaping’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/httr’
Warning in install.packages :
  installation of package ‘httr’ had non-zero exit status
ERROR: dependency ‘stringi’ is not available for package ‘stringr’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/stringr’
Warning in install.packages :
  installation of package ‘stringr’ had non-zero exit status
ERROR: dependency ‘httr’ is not available for package ‘gargle’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/gargle’
Warning in install.packages :
  installation of package ‘gargle’ had non-zero exit status
ERROR: dependency ‘stringr’ is not available for package ‘selectr’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/selectr’
Warning in install.packages :
  installation of package ‘selectr’ had non-zero exit status
ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘ragg’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/ragg’
Warning in install.packages :
  installation of package ‘ragg’ had non-zero exit status
ERROR: dependency ‘stringr’ is not available for package ‘tidyr’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/tidyr’
Warning in install.packages :
  installation of package ‘tidyr’ had non-zero exit status
ERROR: dependencies ‘stringr’, ‘tidyr’ are not available for package ‘broom’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/broom’
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status
ERROR: dependency ‘tidyr’ is not available for package ‘dbplyr’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/dbplyr’
Warning in install.packages :
  installation of package ‘dbplyr’ had non-zero exit status
ERROR: dependencies ‘gargle’, ‘httr’ are not available for package ‘googledrive’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/googledrive’
Warning in install.packages :
  installation of package ‘googledrive’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘selectr’, ‘xml2’ are not available for package ‘rvest’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/rvest’
Warning in install.packages :
  installation of package ‘rvest’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘gargle’, ‘googledrive’, ‘httr’ are not available for package ‘googlesheets4’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/googlesheets4’
Warning in install.packages :
  installation of package ‘googlesheets4’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘tidyr’ are not available for package ‘modelr’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/modelr’
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘dbplyr’, ‘googledrive’, ‘googlesheets4’, ‘httr’, ‘modelr’, ‘ragg’, ‘rvest’, ‘stringr’, ‘tidyr’, ‘xml2’ are not available for package ‘tidyverse’
* removing ‘/raid/home/soundai/R/x86_64-pc-linux-gnu-library/4.1/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

Read more here: Source link