devtools, phyloseq, DECIPHER installation errors in R version 4.3.1

Hi,

I am sorry to post 3 different errors/issues in a single post but I assume this would be more time-saving. I installed R and RStudio on a remote server to run R script that requires a higher memory space and I need to install a bunch of R packages for microbiome analyses.

The first package is devtools where I got this error:

ERROR: configuration failed for package ‘xml2’

  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/xml2’
    Warning in install.packages :
    installation of package ‘xml2’ had non-zero exit status
    ERROR: dependency ‘textshaping’ is not available for package ‘ragg’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/ragg’
    Warning in install.packages :
    installation of package ‘ragg’ had non-zero exit status
    ERROR: dependency ‘xml2’ is not available for package ‘roxygen2’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/roxygen2’
    Warning in install.packages :
    installation of package ‘roxygen2’ had non-zero exit status
    ERROR: dependency ‘xml2’ is not available for package ‘rversions’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/rversions’
    Warning in install.packages :
    installation of package ‘rversions’ had non-zero exit status
    ERROR: dependency ‘xml2’ is not available for package ‘urlchecker’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/urlchecker’
    Warning in install.packages :
    installation of package ‘urlchecker’ had non-zero exit status
    ERROR: dependencies ‘ragg’, ‘xml2’ are not available for package ‘pkgdown’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/pkgdown’
    Warning in install.packages :
    installation of package ‘pkgdown’ had non-zero exit status
    ERROR: dependencies ‘pkgdown’, ‘roxygen2’, ‘rversions’, ‘urlchecker’ are not available for package ‘devtools’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/devtools’
    Warning in install.packages :
    installation of package ‘devtools’ had non-zero exit status

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


The second is phyloseq using BiocManager::install("phyloseq"), I got this error:

/bin/ld: cannot find -llapack
/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10: vegan.so] Error 1
ERROR: compilation failed for package ‘vegan’

  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/vegan’
    ERROR: dependency ‘RcppArmadillo’ is not available for package ‘ade4’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/ade4’
    ERROR: dependencies ‘ade4’, ‘ape’, ‘igraph’, ‘vegan’ are not available for package ‘phyloseq’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/phyloseq’

The downloaded source packages are in
‘/tmp/RtmpJuYrbk/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
boot, foreign, Matrix, nlme, spatial, survival
path: /usr/local/lib/R/site-library
packages:
modeest
Warning messages:
1: In install.packages(...) :
installation of package ‘RcppArmadillo’ had non-zero exit status
2: In install.packages(...) :
installation of package ‘ape’ had non-zero exit status
3: In install.packages(...) :
installation of package ‘igraph’ had non-zero exit status
4: In install.packages(...) :
installation of package ‘vegan’ had non-zero exit status
5: In install.packages(...) :
installation of package ‘ade4’ had non-zero exit status
6: In install.packages(...) :
installation of package ‘phyloseq’ had non-zero exit status


Then DECIPHER using BiocManager::install("DECIPHER")

installing to /home/eman/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-DECIPHER/00new/DECIPHER/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

  • DONE (DECIPHER)

The downloaded source packages are in
‘/tmp/RtmpJuYrbk/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
boot, foreign, Matrix, nlme, spatial, survival
path: /usr/local/lib/R/site-library
packages:
modeest

Thanks for your support!

Are you using RStudio Server on the remote and what user are you doing the installs under? Do you have sudo privileges? Are you installing from the RStudio package manager, install.packages() within RStudio, from the console or from the R CLI? Have you installed any packages at all? Those are global questions that may help unravel the puzzle.

Some of the errors like

relate to other packages that haven't been installed. Those can be fixed through the tedious process of installing them separately, bracing for the possibility that the dependencies will have dependencies.

For phylosec a systems dependency (not an R package) is the problem. The fix is

sudo apt-get install liblapack-dev
sudo apt-get install libblas-dev

Finally

can probably be fixed in dotfiles, but need to understand what user RStudio is running under.

Hi,

Thanks for your reply and suggestions.
Are you using RStudio Server on the remote and what user are you doing the installs under? Do you have sudo privileges? Are you installing from the RStudio package manager, install.packages() within RStudio, from the console or from the R CLI? Have you installed any packages at all? Those are global questions that may help unravel the puzzle.
No, I installed the regular R and RStudio programs using the sudo password of one of the users who has sudo privilege. The installation was on that person's account, but RStudio is still accessible to other users.
Yes, I installed some packages (e.g., ggplot2, gridExtra, WritXLS, knitr, markdown, reshape2) successfully from either RStudio package manager, install.packages() within RStudio, or the console.

relate to other packages that haven't been installed. Those can be fixed through the tedious process of installing them separately, bracing for the possibility that the dependencies will have dependencies.

Is there any easy way to install these packages instead of going through them one by one?

sudo apt-get install liblapack-dev
sudo apt-get install libblas-dev

To do so, I have to go back to the admin to use sudo. Is it possible to use the admin password in my account or it has to be from their account knowing that there is more than one person having sudo privilege?


I also tried to install some of the required packages in the error generated from the first package such as xml2, ragg, roxygen2) and none of them worked (see below):

ERROR: configuration failed for package ‘xml2’

  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/xml2’
    Warning in install.packages :
    installation of package ‘xml2’ had non-zero exit status

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

install.packages("ragg")
Installing package into ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘textshaping’

trying URL 'https://cloud.r-project.org/src/contrib/textshaping_0.3.6.tar.gz'
Content type 'application/x-gzip' length 35722 bytes (34 KB)

downloaded 34 KB

trying URL 'https://cloud.r-project.org/src/contrib/ragg_1.2.5.tar.gz'
Content type 'application/x-gzip' length 427859 bytes (417 KB)

downloaded 417 KB

  • installing source package ‘textshaping’ ...
    ** package ‘textshaping’ successfully unpacked and MD5 sums checked
    ** using staged installation
    Package harfbuzz was not found in the pkg-config search path.
    Perhaps you should add the directory containing harfbuzz.pc' to the PKG_CONFIG_PATH environment variable No package 'harfbuzz' found Package fribidi was not found in the pkg-config search path. Perhaps you should add the directory containing fribidi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'fribidi' found
    Using PKG_CFLAGS=
    Using PKG_LIBS=-lfreetype -lharfbuzz -lfribidi -lpng
    --------------------------- [ANTICONF] --------------------------------
    Configuration failed to find the harfbuzz freetype2 fribidi library. Try installing:
  • deb: libharfbuzz-dev libfribidi-dev (Debian, Ubuntu, etc)
  • rpm: harfbuzz-devel fribidi-devel (Fedora, EPEL)
  • csw: libharfbuzz_dev libfribidi_dev (Solaris)
  • brew: harfbuzz fribidi (OSX)
    If harfbuzz freetype2 fribidi is already installed, check that 'pkg-config' is in your
    PATH and PKG_CONFIG_PATH contains a harfbuzz freetype2 fribidi.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: hb-ft.h: No such file or directory
    compilation terminated.

ERROR: configuration failed for package ‘textshaping’

  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/textshaping’
    Warning in install.packages :
    installation of package ‘textshaping’ had non-zero exit status
    ERROR: dependency ‘textshaping’ is not available for package ‘ragg’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/ragg’
    Warning in install.packages :
    installation of package ‘ragg’ had non-zero exit status

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

install.packages("roxygen2")
Installing package into ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘xml2’

trying URL 'https://cloud.r-project.org/src/contrib/xml2_1.3.5.tar.gz'
Content type 'application/x-gzip' length 272664 bytes (266 KB)

downloaded 266 KB

trying URL 'https://cloud.r-project.org/src/contrib/roxygen2_7.2.3.tar.gz'
Content type 'application/x-gzip' length 279442 bytes (272 KB)

downloaded 272 KB

  • 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 ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/xml2’
    Warning in install.packages :
    installation of package ‘xml2’ had non-zero exit status
    ERROR: dependency ‘xml2’ is not available for package ‘roxygen2’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/roxygen2’
    Warning in install.packages :
    installation of package ‘roxygen2’ had non-zero exit status

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

I also found this code for xml2 but it needs sudo privilege:

sudo apt install libcurl4-openssl-dev libssl-dev libxml2-dev


Your help is much appreciated!

Before continuing, it sounds like this is being setup for multiple users. Remotely? Concurrently? R is single-threaded, and the Desktop GUI doesn’t support (I think, will check) headless serving (I.e., running on a host without also using the host’s graphics display).

Yes!
Updates:

I ran these codes from the account that has sudo priv.:

sudo apt install libcurl4-openssl-dev libssl-dev libxml2-dev

sudo apt-get install liblapack-dev
sudo apt-get install libblas-dev

Then I ran
install.package

and got this error:

installing to /home/omo/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-testthat/00new/testthat/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

  • DONE (testthat)
    ERROR: dependency ‘pkgdown’ is not available for package ‘devtools’
  • removing ‘/home/omo/R/x86_64-pc-linux-gnu-library/4.3/devtools’
    Warning in install.packages :
    installation of package ‘devtools’ had non-zero exit status

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

even when I installed pkgdown using install.packages() manager, I got this:

installing to /home/eman/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-xml2/00new/xml2/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

  • DONE (xml2)
    ERROR: dependency ‘textshaping’ is not available for package ‘ragg’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/ragg’
    Warning in install.packages :
    installation of package ‘ragg’ had non-zero exit status
    ERROR: dependency ‘ragg’ is not available for package ‘pkgdown’
  • removing ‘/home/eman/R/x86_64-pc-linux-gnu-library/4.3/pkgdown’
    Warning in install.packages :
    installation of package ‘pkgdown’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpG7ZD0A/downloaded_packages’
same with installing phyloseq:

installing to /home/omo/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-Biostrings/00new/Biostrings/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
in method for ‘twoWayAlphabetFrequencyByQuality’ with signature ‘"QualityScaledXStringSet"’: no definition for class “QualityScaledXStringSet”
Creating a new generic function for ‘strsplit’ in package ‘Biostrings’
Creating a generic function for ‘ls’ from package ‘base’ in package ‘Biostrings’
Creating a new generic function for ‘pattern’ in package ‘Biostrings’
Creating a new generic function for ‘offset’ in package ‘Biostrings’
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

  • DONE (Biostrings)
  • installing source package ‘phyloseq’ ...
    ** using staged installation
    ** R
    ** data
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
  • DONE (phyloseq)

The downloaded source packages are in
‘/tmp/Rtmp5AriaF/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
boot, foreign, Matrix, nlme, spatial, survival
path: /usr/local/lib/R/site-library
packages:
modeest
Latest installation were done by the user with sudo privilege, however, it did not work as well.

Help on this is much appreciated!

That's success.

This type of message is asking for

install.packags("pkgdown")

Again, success.

Again

install.packages("textshaping")

If installs ok, this is just for information.

Success

Success

Sorry? What didn't?

Hi,

I found these codes very helpful that unlocked the installation process:

sudo apt update

sudo apt upgrade

sudo apt install libcurl4-openssl-dev

sudo apt-get install libbz2-dev liblzma-dev

sudo apt-get install libfontconfig1-dev

sudo apt-get install libharfbuzz-dev libfribidi-dev

sudo apt-get install libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev

So, all the needed packages are now installed. However, I still have to run the script from the account with sudo privilege, not from mine.

Thanks!

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.