4

I have updated R and get problems when I want to run old scripts. Specifically, one of the packages I use has been removed from CRAN and I get the following error message when I try to load the installed package (installed from a binary file of the latest version of the package without any problem. As you can see, the package in question is the ACER package):

Failed with error:  ‘package ‘acer’ was built before R 3.0.0: please re-install it’

Is it possible to recompile the source file to get binary files that work on R > 3.0.0?? This package worked fine on previous version R 3.0.1, but not on R 3.1.1. Is there any way I can get this package correctly loaded on R 3.1.1 (using either the source file or the file compiled for R 3.0.1?

I already tried to install from source, but it doesn't work. I get this error messages, which don't make too much sense to me. Is there an easy way out of this?

> install.packages(pkgs="acer_0.1.2.tar.gz", type="source", repos=NULL)

Installing package into ‘C:/Users/user/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package 'acer' ...
** package 'acer' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="acer.dll" OBJECTS="estimate_acer.o peaks.o"' had status 127
ERROR: compilation failed for package 'acer'
* removing 'C:/Users/user/Documents/R/win-library/3.1/acer'
* restoring previous 'C:/Users/user/Documents/R/win-library/3.1/acer'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\user\Documents\R\win-library\3.1" "acer_0.1.2.tar.gz"' had status 1 
2: In install.packages(pkgs = "acer_0.1.2.tar.gz", type = "source",  :
  installation of package ‘acer_0.1.2.tar.gz’ had non-zero exit status

I also tried installing it from the command line but get similar errors. Can anyone help?

Erik
  • 103
  • 5
  • 4
    Get the package from [the CRAN archive](http://cran.rstudio.com/src/contrib/Archive/acer/) and install it from source. – Joshua Ulrich Jan 15 '15 at 14:14
  • Install the package from source. It seems to have been removed from CRAN due to [problems with its vignette](http://cran.r-project.org/web/packages/acer/index.html). So, hopefully there are no other more serious problems. – Roland Jan 15 '15 at 14:15
  • 2
    can do from url for a source pkg too like `install.packages("http://cran.r-project.org/src/contrib/Archive/acer/acer_0.1.2.tar.gz", repos = NULL, type = "source")` – sckott Jan 15 '15 at 14:43
  • I gave up installing it on a newer version of R so instead I have installed the previous version, 3.0.1 of R on another (Windows)-machine. Still, I get some errors trying to install this package. Now I get exit status 1. Can anyone help me? (I get the same errors with another package - both have successfully been installed on my old laptop on the same version of R). This is the errors I get: – Erik May 21 '15 at 12:38
  • * installing *source* package 'acer' ... ** package 'acer' successfully unpacked and MD5 sums checked ** libs ERROR: compilation failed for package 'acer' * removing 'C:/Users/erva/Documents/R/R-3.0.1/library/acer' Warning messages: 1: running command '"C:/Users/erva/Documents/R/R-3.0.1/bin/x64/R" CMD INSTALL -l "C:\Users\erva\Documents\R\R-3.0.1\library" "acer_0.1.2.tar.gz"' had status 1 2: In install.packages("acer_0.1.2.tar.gz", repos = NULL, type = "source") : installation of package ‘acer_0.1.2.tar.gz’ had non-zero exit status – Erik May 21 '15 at 12:41

1 Answers1

0

Do you have Rcpp installed and on your path?

I think error code 127 on make means that the program couldn't be found in your $PATH and the only dependency of acer seems to be Rcpp.

Hope this helps -A

Arjun
  • 5,978
  • 3
  • 12
  • 10
  • Thanks for your advice. I installed Rcpp and unfortunately it did not help. I get the exact same error message. Any other ideas how I can install the ACER package? – Erik Mar 31 '15 at 09:13
  • So according to [this question on stackoverflow](http://stackoverflow.com/questions/1763156/127-return-code-from), 127 means that some command in the makefiles was not understood, or does not have +x permissions. Maybe check the three makefiles "Makevars.win" , "C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf" and "C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk" for a line calling a tool you don't have installed? – Arjun Mar 31 '15 at 23:50