# qiime2R IRanges installation issue

**URL:** https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295
**Category:** Other Bioinformatics Tools
**Tags:** qiime2-r
**Created:** [August 28, 2019, 2:30pm UTC](https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295 "2019-08-28T14:30:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![macruz258](https://forum.qiime2.org/user_avatar/forum.qiime2.org/macruz258/32/5629_2.png) [@macruz258](https://forum.qiime2.org/u/macruz258)
#### Post date: [August 28, 2019, 2:30pm UTC](https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295/1 "2019-08-28T14:30:58Z")

</div>

Hello @jbisanz  
Thank you for this package! I am trying to install it in R 3. 6.1 and I get this error:  
Error: Failed to install 'qiime2R' from GitHub:  
(converted from warning) cannot remove prior installation of package ‘IRanges'

Could you please help me figure it out how to fix it? I would appreciate it very much,

Maritsa Cruz

---

<div class="post-metadata">

### Author: ![jwdebelius](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jwdebelius/32/9655_2.png) [@jwdebelius](https://forum.qiime2.org/u/jwdebelius)
#### Post date: [August 28, 2019, 2:34pm UTC](https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295/2 "2019-08-28T14:34:21Z")

</div>

Hi @macruz258,

Welcome to the forum! I split this out into a separate topic since it deals with a different version of R and addresses what looks to be a different issue.

Best,  
Justine

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [August 28, 2019, 2:58pm UTC](https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295/3 "2019-08-28T14:58:32Z")

</div>



---

<div class="post-metadata">

### Author: ![jbisanz](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jbisanz/32/1720_2.png) [@jbisanz](https://forum.qiime2.org/u/jbisanz)
#### Post date: [August 28, 2019, 6:22pm UTC](https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295/4 "2019-08-28T18:22:23Z")

</div>

Hmm, I just updated to 3.6.1 from 3.6.0 and did not run into this issue on my OSX machine. Are you using a shared server where you might not have appropriate permissions?

IRanges is a dependency of Biostrings which is used for importing fasta files in qiime2R. I would try to remove the old version and install the newest one as below:

```auto
remove.packages("IRanges")
BiocManager::install("IRanges")
library(IRanges)
devtools::install_github("jbisanz/qiime2R")

```

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [August 28, 2019, 6:24pm UTC](https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295/5 "2019-08-28T18:24:02Z")

</div>



---

<div class="post-metadata">

### Author: ![macruz258](https://forum.qiime2.org/user_avatar/forum.qiime2.org/macruz258/32/5629_2.png) [@macruz258](https://forum.qiime2.org/u/macruz258)
#### Post date: [August 29, 2019, 1:22pm UTC](https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295/6 "2019-08-29T13:22:53Z")

</div>

Thank you Jordan for your quick answer! It looks like it is installed now with this code you provided. I will contact you if I run into another issue. Btw, I use a windows computer. I thought that might have been the issue at the beginning. Thanks again!

---

<div class="post-metadata">

### Author: ![MCD-DNA1](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/8c91f0/32.png) [@MCD-DNA1](https://forum.qiime2.org/u/MCD-DNA1)
#### Post date: [December 13, 2024, 8:00pm UTC](https://forum.qiime2.org/t/qiime2r-iranges-installation-issue/11295/7 "2024-12-13T20:00:06Z")

</div>

I had similar problem, then I noticed this message within error message:

Installation paths not writeable, unable to update packages  
path: /usr/lib/R/library  
packages:  
boot, cluster, codetools, foreign, lattice, nlme, spatial

Now, I had these packages installed. So I just activated each of them

```auto
library(boot, lib.loc = "/usr/lib/R/library")
library(cluster, lib.loc = "/usr/lib/R/library")
library(codetools, lib.loc = "/usr/lib/R/library")
library(foreign, lib.loc = "/usr/lib/R/library")
library(lattice, lib.loc = "/usr/lib/R/library")

```

then I tried this again...

if (!requireNamespace("devtools", quietly = TRUE)){install.packages("devtools")}  
devtools::install\_github("jbisanz/qiime2R")

And it WORKED! Hooray!!!
