I am facing issues in "dplyr" installation package! I can't install "dplyr" package to my RStudio while all other packages installed without any errors! My system is macOS Sierra.
This is what shows up every time that I tried to install it:
Error: package ‘bindrcpp’ 0.2 was found, but >= 0.2.0.9000 is required by ‘dplyr’
removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/dplyr’
Warning in install.packages :
installation of package ‘dplyr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/_t/h6dhlh5945gg4jksdqbkkkrc0000gr/T/Rtmpk4KIeT/downloaded_packages’
I installed "Rcpp" and "bindrcpp".
The following error is regarding the "bindrcpp" installation;
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace ‘Rcpp’ 0.12.6 is being loaded, but >= 0.12.16 is required
ERROR: lazy loading failed for package ‘bindrcpp’
restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/bindrcpp’
Warning in install.packages :
installation of package ‘bindrcpp’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/_t/h6dhlh5945gg4jksdqbkkkrc0000gr/T/Rtmpk4KIeT/downloaded_packages’
And this is for "Rcpp" installation:
Error: cannot remove prior installation of package ‘acepack’
In addition: Warning message:
In install.packages(pkgs = doing, lib = lib, ...) :
installation of package ‘Rcpp’ had non-zero exit status
In short you cannot install dplyr because you need a later edition of bindrcpp, but cannot install bindrcpp because you need a later edition of Rcpp, but cannot install Rcpp because you can't uninstall acepack.
So let's start with acepack. If you look at the dependencies for Rcpp, you won't find acepack, so the rabbit hole probably goes deeper than just that. But let's try to remove it, first.
library(utils)
remove.packages("acepack")
If that works, great! But it's a bandaid because you are several releases behind on R, one behind on OSX, at least one behind on XCode and its command line utilities. It will become increasingly hard to install libraries that need compilation from source.
For "dplyr":
Error: package ‘bindrcpp’ 0.2 was found, but >= 0.2.0.9000 is required by ‘dplyr’
removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/dplyr’
Warning in install.packages :
installation of package ‘dplyr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/_t/h6dhlh5945gg4jksdqbkkkrc0000gr/T/Rtmpk4KIeT/downloaded_packages’
For "Rcpp"
ERROR: installing package DESCRIPTION failed for package ‘Rcpp’
removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/_t/h6dhlh5945gg4jksdqbkkkrc0000gr/T/Rtmpk4KIeT/downloaded_packages’
We at least eliminated the acepack error. But Rcpp failed at the earliest possible point, which suggests to me that it's time for some serious updating. What I would do on my own machine is
Back up everything not in the cloud.
Download and install Mojave from the App Store
Download and install XCode from the App Store (both free)
From the terminal enter the command xcode-select -v to install the compile tools you will need
In this order: install.packages("Rcpp")install.packages(bindrcpp) and install.packages('dplyr)`
The reason I didn't suggest this first is that it will take a couple of hours. It's a good idea to check the R version for updates at https://cran.r-project.org every three months or so and once or twice a month r update.packages(). If you are offered a later version in source form, pass to avoid possible compilation fails (it seems to happen to me about 25% of the time); usually, an OSX binary will show up in a couple of weeks.