R Keeps Downloading Packages to tmp Directory
Asked Answered
E

1

6

I am using R Studio on a 2103 MacBook Pro. I had no problems before downloading and installing packages, but recently all my packages are being downloaded and then fail to install:

trying URL 'http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/manipulate_1.0.1.tgz' 
Content type 'application/x-gzip' length 33770 bytes (32 Kb) 
opened URL
==================================================
downloaded 32 Kb

The downloaded binary packages are in
/var/folders/yl/7q0_4h3j60d5pp52vmz0b06r0000gn/T//Rtmpa4oYSr/downloaded_packages

.libPath() returns the correct location of my R libraries (not this)

I can install manually from the downloaded package, but this extra step is Very Annoying, and I would like to restore the correct behavior.

Someone seems to have had the same problem here. The solution was to add more swap space. This does not seem to be my issue as ample swap and RAM appear to be available on my machine.

Has anyone had and resolved this issue?

Elephantine answered 4/2, 2015 at 3:13 Comment(3)
What do you call "wrong directory"? RStudio will download archive in a temporary folder, install the library in your local "library" folder (the one in your .libPath()) then delete the archive in the temporary folder. What is the error message? RStudio cannot write inside the temporary folder? It cannot open the file? It cannot write in your "library" folder?Gremlin
I get 'Error in library : there is no package called ...' which led me to believe something was wrong with the download path, but it sounds like this is the correct behavior. Thanks for the clarification.Elephantine
Same thing was happening to me on my linux machine, I had 16GB RAM (even with all processes shutdown) and for certain packages it would occur. I tried re-installing and it still happened the only solution for me was to increase the swap file size.Wade
U
6

Posting the Answer from the user so as not to lose info:

When you download r Packages,R shows the temp path where the files are downloaded like below...

The downloaded binary packages are in /var/folders/yl/7q0_4h3j60d5pp52vmz0b06r0000gn/T//Rtmpa4oYSr/downloaded_packages

But R deletes these files in Temp folders and install them in .libpath() path once the installation is done..

Unfounded answered 4/2, 2015 at 3:14 Comment(2)
Would be fantastic if this confusing message were deprecated to prevent people from continuing to ask this question.Plinth
@BrashEquilibrium I was going to say the same thing. Or better, why not something like The binary packages downloaded to /var/folders/yl/7q0_4h3j60d5pp52vmz0b06r0000gn/T//Rtmpa4oYSr/downloaded_packages and installed in .libpath() Either way, the current message is misleadingSurmount

© 2022 - 2024 — McMap. All rights reserved.