New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After update unable to install dplyr due to problems witk Rcpp-package and BH-package #2002
Comments
I'd recommend restarting in a clean R session and trying to install again. |
This error:
usually occurs on Windows when attempting to install a package that is already loaded or attached. To confirm, you can check what packages are currently loaded with:
The easiest resolution would be to reinstall both Rcpp and dplyr in a clean R session, with e.g.
|
I closed R-Studio, opened R Console, installed dplyr twice, first time the same problem with both Rcpp and BH. Third time, BH was installed! |
Kevin, saw your post too late, but thanx (and Hadley too of course!). |
Ah, perhaps the issue is that R is attempting to install packages into the system R library (where you might not have write permissions). You probably want to force R to use a user library. Try running this command in an R session:
Then, in a clean R session, check the output of:
You should see two paths; with the first one being the path we created in the first step. After that, you should be able to successfully install |
I did:
So the paths are correct, but got this error after trying to install Rcpp. package ‘Rcpp’ successfully unpacked and MD5 sums checked |
Just a random guess. This kind of error can also be caused by antivirus software on Windows. |
The only other thing I could think of would be manually removing the directory at:
and trying again; alternatively, @thirdwing could be correct (maybe an antivirus scanner is acquiring a lock on these files that disallows the R process from moving them to the library folder after download?) |
Shut McAfee down and that solved the problem! |
For others who may find this, I had the same issue, and recursively removing a read-only property from the library directory fixed it for me.
|
In addition to the above, I found I still had issues writing to the library so I had to tell R Studio where I wanted the library. This meant changing the environment. Eric Krantz has provided some great instructions on how to do this in the R Community forum: How to edit R_LIBS_USER to change where your package library resides: Let's assume you want your packages to reside in C:\R\Library:
Note: I did have to create the R_LIBS_USER entry and point it to the where the library files were on my computer. As soon as I started R Studio and ran the library() command, it recognised my new environment setting. |
I had a some-what similar problem: Everytime I started R Studio, the following message appeared: I tried many things, including loading the "dplyr" package, and I got this message: After reading this post, I tried installing the "Rcpp" package, and it worked:
Then when I tried loading the "dplyr" package, I got the following message:
(the last part explains where the problem was, I think!) Finally, I installed the latest version of the "dplyr" package. I was also able to load the "lme4" package. I hope this helps.. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
I am very 'green' and using Windows 10, R version 3.3.1, R-Studio verion 0.99.491.
When I try to install the dplyr package, I keep getting these errors:
#1 (for Rcpp):
package ‘Rcpp’ successfully unpacked and MD5 sums checked Warning in install.packages :
unable to move temporary installation ‘C:\Program Files\R\R-3.3.1\library\file548c25005671\Rcpp’ to ‘C:\Program Files\R\R-3.3.1\library\Rcpp’
#2 (for BH):
package ‘BH’ successfully unpacked and MD5 sums checkedWarning in install.packages :
unable to move temporary installation ‘C:\Program Files\R\R-3.3.1\library\file548c7b673dab\BH’ to ‘C:\Program Files\R\R-3.3.1\library\BH’
I tried to run dplyr, but logically I get the error:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘Rcpp’
I hope this is the right place for my question. Any clues??
Thanking you in advance!!
The text was updated successfully, but these errors were encountered: