Problems Installing Qiime2R

Hi. I am trying to install Qiime2R and have also read a discussions about this. However, I am still having some problems and would appreciate any help.

I have installed tidyverse and tried the same for devtools by running the lines below:

install.packages("tidyverse")
library(tidyverse)
install.packages("devtools")
devtools::install_github("jbisanz/qiime2R")
library(qiime2R)

Unfortunately, I received several errors on R about "non-zero exit status" when installing devtools.

Thank you in advance for your help!

Hi @YinXun,

Can you please share more details about the error message. I think you need to first install the package devtools successfully and then you can use install Qiime2R.

2 Likes

@Lei is correct, the issue is with installing devtools, but to spot the issue we would need to know the exact error messages that preceeed the non-zero exit status and information about your operating system. You can side step devtools by downloading the source directly from github here, and then installing from the local file as below:

download.file("https://github.com/jbisanz/qiime2R/archive/master.zip", "source.zip")
unzip("source.zip")
install.packages("qiime2R-master", repos = NULL, type="source")

The only catch in doing this is it may not be able to find necessary dependencies, which you can manually install. There are listed here under imports.

2 Likes

Hi Lei and Jordan,

Thank you very much for your quick replies. I can’t seem to install devtools completely, as it starts out fine then half way produces the error below:

------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
** * deb: libssl-dev (Debian, Ubuntu, etc)**
** * rpm: openssl-devel (Fedora, CentOS, RHEL)**
** * csw: libssl_dev (Solaris)**
** * brew: [email protected] (Mac OSX)**
If openssl is already installed, check that ‘pkg-config’ is in your
PATH and PKG_CONFIG_PATH contains a openssl.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 ‘openssl’
*** removing ‘/home/allio/R/x86_64-pc-linux-gnu-library/3.5/openssl’**
Warning in install.packages :
** installation of package ‘openssl’ had non-zero exit status**
ERROR: dependency ‘openssl’ is not available for package ‘httr’
*** removing ‘/home/allio/R/x86_64-pc-linux-gnu-library/3.5/httr’**
Warning in install.packages :
** installation of package ‘httr’ had non-zero exit status**
ERROR: dependency ‘httr’ is not available for package ‘gh’
*** removing ‘/home/allio/R/x86_64-pc-linux-gnu-library/3.5/gh’**
Warning in install.packages :
** installation of package ‘gh’ had non-zero exit status**
ERROR: dependency ‘httr’ is not available for package ‘covr’
*** removing ‘/home/allio/R/x86_64-pc-linux-gnu-library/3.5/covr’**
Warning in install.packages :
** installation of package ‘covr’ had non-zero exit status**
ERROR: dependency ‘gh’ is not available for package ‘usethis’
*** removing ‘/home/allio/R/x86_64-pc-linux-gnu-library/3.5/usethis’**
Warning in install.packages :
** installation of package ‘usethis’ had non-zero exit status**
ERROR: dependencies ‘usethis’, ‘covr’, ‘httr’ are not available for package ‘devtools’
*** removing ‘/home/allio/R/x86_64-pc-linux-gnu-library/3.5/devtools’**
Warning in install.packages :
** installation of package ‘devtools’ had non-zero exit status**

The downloaded source packages are in
** ‘/tmp/RtmpTPxP77/downloaded_packages’**

@jbisanz , I have run the lines you provided and it was okay until I got to

install.packages(“qiime2R-master”, repos = NULL, type=“source”)

And received the errors:

Installing package into ‘/home/allio/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
ERROR: dependencies ‘biomformat’, ‘phyloseq’ are not available for package ‘qiime2R’
*** removing ‘/home/allio/R/x86_64-pc-linux-gnu-library/3.5/qiime2R’**
Warning in install.packages :
** installation of package ‘qiime2R-master’ had non-zero exit status**

I am still unsure of the errors and potential causes of them. I really appreciate your help and hope I can start using qiime2R soon.

So I figured out that my issue was something related to the PATH.

Managed to solve it by going to linux prompt and did this:

$ sudo apt-get install libssl-dev

Then at R:

install.packages("openssl")
install.packages("swirl")
library(swirl)

Thank you @Lei and @jbisanz again for your help!

3 Likes

Hi @YinXun,

That is great!! Thank you for sharing your method for solving this.