error message with BiocManager::install on Mac console that's not on mac command line
1
0
Entering edit mode
raf4 ▴ 30
@raf4-8249
Last seen 22 months ago
United States

Dear All,

I am using Bioconductor 3.9 with R 3.6.0 on Mac OS 10.14.4

When I try to install a program on the Mac Console I get

> BiocManager::install("org.Mm.eg.db")
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)
Installing package(s) 'org.Mm.eg.db'
Error in res0[, "Package"] : subscript out of bounds

** testing if installed package keeps a record of temporary installation path
* DONE (org.Mm.eg.db)

When I run the same command on the command line it works.

> BiocManager::install("org.Mm.eg.db")
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)
Installing package(s) 'org.Mm.eg.db'
also installing the dependencies ‘bit’, ‘prettyunits’, ‘bit64’, ‘blob’, ‘memois

.....

** testing if installed package keeps a record of temporary installation path
* DONE (org.Mm.eg.db)

I would appreciate any suggestions.

Thanks and best wishes, Richard Friedman

BiocManager Mac • 3.0k views
ADD COMMENT
0
Entering edit mode

What do you mean by the "Mac Console"?

ADD REPLY
0
Entering edit mode

Steve,

Sorry. I meanto to sat, "the RGUI".

Thanks and best wishes, Rich

ADD REPLY
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

My best guess is that you have packages installed under R version 3.5 and packages installed under R version 3.6 in the same library. What does

BiocManager::valid()

have to say? Does corrrecting any issues suggested there resolve the problem?

ADD COMMENT
0
Entering edit mode

Martin,

In the RGUI I got

> BiocManager::valid()
Error in res0[, "Package"] : subscript out of bounds
On the command line I got:

Bioconductor version '3.9'

  * 2 packages out-of-date
  * 0 packages too new

create a valid installation with

  BiocManager::install(c(
    "rgl", "rtracklayer"
  ), update = TRUE, ask = FALSE)

These are 2 programs that required compilation and I ran into trouble, so I used an older version: Here is an excerpt (because of length(from when I tried to compile them:

> BiocManager::install(c(
+     "rgl", "rtracklayer"
+   ), update = TRUE, ask = FALSE)
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)
Installing package(s) 'rgl', 'rtracklayer'

  There are binary versions available but the source versions are later:
              binary   source needs_compilation
rgl         0.100.19 0.100.24              TRUE
rtracklayer   1.43.3   1.44.0              TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
installing the source packages ‘rgl’, ‘rtracklayer’

...

* installing *source* package ‘rgl’ ...
** package ‘rgl’ successfully unpacked and MD5 sums checked
** using staged installation
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Does this give you any clues?

Thanks and best wishes, Rich

ADD REPLY
0
Entering edit mode

I haven't used the R Gui in a long while, is it possible that it's loading something into your workspace on startup that launching R from terminal isn't?

To test that you can quit the R gui, then start it again and see what the output of running ls() in a fresh R session gives? should be nothing ...

ADD REPLY
0
Entering edit mode

...for instance, is .libPaths() different in the two environments?

ADD REPLY
0
Entering edit mode

Steve and Martin,

Thank you for your help.

> ls()
character(0)

in both the Gui and the command line

> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library"

ib both the GUI and the command line.

I looked into the missing xcrun program noted above.

I got the following:

Richards-Mini:~ epiktistes$ cd /Library/Developer/CommandLineTools/usr/bin/xcrun
-bash: cd: /Library/Developer/CommandLineTools/usr/bin/xcrun: No such file or directory

I have

/Library/Developer/CommandLineTools/usr

but no bin in that directory

here is all I have there:

Richards-Mini:usr epiktistes$ ls
share
Richards-Mini:usr epiktistes$ ls share
man

I think that this may be solved by installing xcode. I will try that later this week and let you know how it went.

Best wishes, Rich

ADD REPLY
0
Entering edit mode

Dear Martin and Steve and List,

I installed xcode and I know can install everything in the command line but not in the RGUI. Here is the command line:

> BiocManager::install("rgl")
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)
Installing package(s) 'rgl'
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rgl_0.100.24.tgz'
Content type 'application/x-gzip' length 4765007 bytes (4.5 MB)
==================================================
downloaded 4.5 MB


The downloaded binary packages are in
    /var/folders/7_/51c4cqhx4g5bsdnwkzrnv1fr0000gn/T//RtmpHdbnO6/downloaded_packages
>

Here is the RGUI

> BiocManager::install("rgl")
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 (2019-04-26)
Installing package(s) 'rgl'
Error in readRDS(dest) : unknown input format
>

I would appreciate any suggestions.

Thanks and best wishes, Rich

ADD REPLY
0
Entering edit mode

Also, I had tried the following

Command line

> BiocManager::valid()
[1] TRUE
R

Gui

> BiocManager::valid()
Error in readRDS(dest) : unknown input format
ADD REPLY
0
Entering edit mode

You could try to debug this on your end, by saying

trace(readRDS, quote(print(file)))
BiocManager::valid()

This will print out a number of files, the last file printed will be the one that is causing problems. It will either be a temporary file with a directory Rtmp.... somewhere in the file path, or a package file with <package name>/Mega/package.rds. For the later you should use remove.packages() to remove the package, and repeat BiocManager::valid(). For the former you should restart your R session, being sure to start R with the --vanilla option / without referencing previous RData, etc files.

ADD REPLY
0
Entering edit mode

Martin,

Thanks. Here is the last line I got in the RGUI and my attempt to remove the package:

> remove.packages("repos_http%3A%2F%2Fwatson.nci.nih.gov%2Fcran_mirror%2Fsrc%2Fcontrib.rds")
Removing package from ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library’
(as ‘lib’ is unspecified)
Error in find.package(pkgs, lib) : 
  there is no package called ‘repos_http%3A%2F%2Fwatson.nci.nih.gov%2Fcran_mirror%2Fsrc%2Fcontrib.rds’
> remove.packages("/var/folders/7_/51c4cqhx4g5bsdnwkzrnv1fr0000gn/T//RtmprZqqJT/repos_http%3A%2F%2Fwatson.nci.nih.gov%2Fcran_mirror%2Fsrc%2Fcontrib.rds")
Removing package from ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library’
(as ‘lib’ is unspecified)
Error in find.package(pkgs, lib) : 
  there is no package called ‘/var/folders/7_/51c4cqhx4g5bsdnwkzrnv1fr0000gn/T//RtmprZqqJT/repos_http%3A%2F%2Fwatson.nci.nih.gov%2Fcran_mirror%2Fsrc%2Fcontrib.rds’
>

I received no error message in the R command line.

I closed the RGui and quit the R command lines. I restarted the R command line with --vanilla. Here is the command on the command line:

> BiocManager::valid()
[1] TRUE
>

I restarted the GUI and tried the command;

 > BiocManager::valid()
Error in res0[, "Package"] : subscript out of bounds

Please advise.

Thanks and best wishes, Rich

ADD REPLY
0
Entering edit mode

Please follow instructions closely. The path that you are using remove.package() on is not the path to an installed package, but rather a temporary file. Simply restarting R would result in a different temporary file.

Also, please take a few minutes to review how to format your posts, especially highlighting code chunks and pressing the button with 101/010 in the support site editor. Look at the preview to verify that the content is legible (the legibility of your current posts is because I or others have edited them after the fact).

The information that you post does point to one feature that you might reconsider. Apparently you have selected 'watson.nci.nih.gov' as your CRAN repository. I suggest using the canonical location cran.r-project.org.

Let's stop referencing the command line, which seems to be working.

In the R gui, after the error occurs, use the command traceback() to provide more context about where the error occurs.

BiocManager::valid() # error occurs, so then...
traceback()
ADD REPLY
0
Entering edit mode

Martin, I followed your instructions above. I had to compile one remaining program from source and then BiocManager::install worked from the GUI. Thank you for your help and patience. I will observe formatting guidelines more carefully in the future.

Best wishes, Rich

ADD REPLY

Login before adding your answer.

Traffic: 535 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6