"dplyr" installation error- Non-zero exit status!

Hello,

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’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/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

All have non-zero exit status!

I highly appreciate your help.

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.

5 Likes

Hello,

Thank you for your reply.

I ran the code as you asked and below is the output;

Removing package from ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library’
(as ‘lib’ is unspecified)

So now you want me to install "acepack" again? and then "Rcpp" and then "dplyr"?

Thank you.

Yes, please, except leave out acepack until you need it.

Unfortunately, there are same errors! :((

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’

Any suggestions?

Thank you.

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

  1. Back up everything not in the cloud.
  2. Download and install Mojave from the App Store
  3. Download and install XCode from the App Store (both free)
  4. From the terminal enter the command xcode-select -v to install the compile tools you will need
  5. Download the 3.5.1 .pkb version of R from https://cran.r-project.org
  6. If you're using it, download the latest version of RStudio from https://www.rstudio.com/products/RStudio/
  7. 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.

Gook luck! Let me know how it goes.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.