Installation package problem - IOS - had non-zero exit status

Hello,
I have some problem with installation packages copula, forecast, tseries.

Error Information:

installation of package ‘forecast’ had non-zero exit status

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: 1.1.423
  • OS Version: 10.11.6 OS X El Capitan
  • R Version: 3.4.3

Please advise me what should I do.

Does it install in R, and somehow fail in RStudio? (If so, you should be able to access the package in RStudio if installed in vanilla R). If not, it's likely not an issue with the IDE itself (see FAQ below for disambiguation)

To figure this out it will help to have more of the error message. The non-zero exit status is generic (basically – something went awry!) but the message itself should contain hints that will help with diagnosing the problem.

Good disambiguation! Much appreciated.

I use RStudio that runs off a campus server. When I use this server version of RStudio, I receive the non-zero exit message (I will paste the message below in a bit). However, when I use the local version of RStudio (so the 'non-server' version), forecast() loads brilliantly. I've consulted the internet, but I cannot seem to locate a fix.

Here's the error message as you requested in the original thread:

> install.packages('forecast')
Installing package into ‘/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘ggplot2’

trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.0.0.tar.gz'
Content type 'application/x-gzip' length 2847050 bytes (2.7 MB)
==================================================
downloaded 2.7 MB

trying URL 'https://cran.rstudio.com/src/contrib/forecast_8.4.tar.gz'
Content type 'application/x-gzip' length 583218 bytes (569 KB)
==================================================
downloaded 569 KB

* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error : object ‘enexprs’ is not exported by 'namespace:rlang'
ERROR: lazy loading failed for package ‘ggplot2’
* removing ‘/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status
* installing *source* package ‘forecast’ ...
** package ‘forecast’ successfully unpacked and MD5 sums checked
** libs
g++ -m64  -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c calcBATS.cpp -o calcBATS.o
calcBATS.cpp: In function ‘SEXPREC* calcBATSFaster(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’:
calcBATS.cpp:58:10: warning: ‘lengthSeasonal’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  R_len_t lengthSeasonal;
          ^
calcBATS.cpp:57:53: warning: ‘sPeriods’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int adjBeta, previousS, lengthArma, *tau, *p, *q, *sPeriods;
                                                     ^
g++ -m64  -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c calcTBATS.cpp -o calcTBATS.o
g++ -m64  -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c etsTargetFunction.cpp -o etsTargetFunction.o
etsTargetFunction.cpp: In member function ‘void EtsTargetFunction::eval(const double*, int)’:
etsTargetFunction.cpp:87:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(p_par_length != this->par.size()) {
                                    ^
etsTargetFunction.cpp:119:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=par.size()-nstate; i < par.size(); i++) {
                                            ^
etsTargetFunction.cpp:147:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=start; i<state.size(); i++) {
                                 ^
etsTargetFunction.cpp:163:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0; i <= p*this->y.size(); i++) state.push_back(0);
                                   ^
etsTargetFunction.cpp: In member function ‘bool EtsTargetFunction::admissible()’:
etsTargetFunction.cpp:302:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<zeror.size();i++) {
                            ^
g++ -m64  -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c etsTargetFunctionWrapper.cpp -o etsTargetFunctionWrapper.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c etscalc.c -o etscalc.o
etscalc.c: In function ‘etssimulate’:
etscalc.c:119:15: warning: variable ‘nstates’ set but not used [-Wunused-but-set-variable]
     int i, j, nstates;
               ^
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c etspolyroot.c -o etspolyroot.o
g++ -m64  -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c makeBATSMatrices.cpp -o makeBATSMatrices.o
makeBATSMatrices.cpp: In function ‘SEXPREC* makeBATSWMatrix(SEXP, SEXP, SEXP, SEXP)’:
makeBATSMatrices.cpp:7:31: warning: ‘maCoefs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  double *smallPhi, *arCoefs, *maCoefs;
                               ^
makeBATSMatrices.cpp:7:21: warning: ‘arCoefs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  double *smallPhi, *arCoefs, *maCoefs;
                     ^
makeBATSMatrices.cpp:8:7: warning: ‘seasonalPeriods’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int *seasonalPeriods;
       ^
makeBATSMatrices.cpp:63:30: warning: ‘smallPhi’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   wTranspose(0,1) = *smallPhi;
                              ^
makeBATSMatrices.cpp: In function ‘SEXPREC* makeBATSGMatrix(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’:
makeBATSMatrices.cpp:146:44: warning: ‘seasonalPeriods’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     position = position + seasonalPeriods[s];
                                            ^
makeBATSMatrices.cpp:147:48: warning: ‘gammaVector’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     gTranspose(0, position) = gammaVector[(s+1)];
                                                ^
g++ -m64  -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c makeTBATSMatrices.cpp -o makeTBATSMatrices.o
makeTBATSMatrices.cpp: In function ‘SEXPREC* makeTBATSWMatrix(SEXP, SEXP, SEXP, SEXP, SEXP)’:
makeTBATSMatrices.cpp:7:31: warning: ‘maCoefs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  double *smallPhi, *arCoefs, *maCoefs;
                               ^
makeTBATSMatrices.cpp:7:21: warning: ‘arCoefs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  double *smallPhi, *arCoefs, *maCoefs;
                     ^
makeTBATSMatrices.cpp:64:28: warning: ‘tau’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    wTranspose(0,(adjustPhi + *tau +i)) = arCoefs[(i-1)];
                            ^
makeTBATSMatrices.cpp:44:57: warning: ‘kVector’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     for(int j = (position+1); j <= (position + kVector[s]); j++) {
                                                         ^
makeTBATSMatrices.cpp:58:30: warning: ‘smallPhi’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   wTranspose(0,1) = *smallPhi;
                              ^
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c registerDynamicSymbol.c -o registerDynamicSymbol.o
g++ -m64  -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c updateMatrices.cpp -o updateMatrices.o
updateMatrices.cpp: In function ‘SEXPREC* updateFMatrix(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’:
updateMatrices.cpp:81:72: warning: ‘beta’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    F.submat(1,(betaAdjust+ *tau+p+1),1,(betaAdjust+ *tau+p+q)) = *beta * ma;
                                                                        ^
g++ -m64  -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I"/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c updateTBATSMatrices.cpp -o updateTBATSMatrices.o
updateTBATSMatrices.cpp: In function ‘SEXPREC* updateTBATSGMatrix(SEXP, SEXP, SEXP, SEXP)’:
updateTBATSMatrices.cpp:38:10: warning: unused variable ‘gammaVector’ [-Wunused-variable]
  double *gammaVector;
          ^
g++ -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o forecast.so calcBATS.o calcTBATS.o etsTargetFunction.o etsTargetFunctionWrapper.o etscalc.o etspolyroot.o makeBATSMatrices.o makeTBATSMatrices.o registerDynamicSymbol.o updateMatrices.o updateTBATSMatrices.o -L/usr/lib64/R/lib -lRlapack -L/usr/lib64/R/lib -lRblas -lgfortran -lm -lquadmath -L/usr/lib64/R/lib -lR
installing to /home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/forecast/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace ‘ggplot2’ 2.1.0 is being loaded, but >= 2.2.1 is required
ERROR: lazy loading failed for package ‘forecast’
* removing ‘/home/ONID.OREGONSTATE.EDU/simmongr/R/x86_64-redhat-linux-gnu-library/3.4/forecast’
Warning in install.packages :
  installation of package ‘forecast’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmpzMd5s0/downloaded_packages’

I hope this helps and thank you for your time!

Greg

It looks like ggplot2 is failing to update/install, due to (I am guessing) an out of date copy of its dependency rlang. Then forecast fails because ggplot2 (on which it depends) is not recent enough.

What happens if you try updating rlang, then try the forecast install again?

Edited to add: I don't think this is an IDE issue after all. The most likely reason you are getting different results when using your campus RStudio Server vs the copy of RStudio Desktop on your own computer is that there are two different R libraries involved: the one on the server, and the one on your computer. If they have slightly different versions of various packages (likely!), then you can get the issue you're seeing. But that's nothing to do with the RStudio IDE. Given the error messages above, I suspect that if you were able to try the installation in plain old R on the campus server, you would have the same result.

2 Likes

Thank you for the quick response! I get the same result when updating rlang. Is there a way to check the libraries involved in each? Not sure what my next step should be. Thanks!

Greg

Hmm, so did rlang seem to successfully update? What version is installed in the server library? To find out, from within an RStudio Server session, check the installed version of rlang in the Packages pane, or run this line in the console:

packageVersion("rlang")

Not quite sure what you have in mind — do you mean compare the installed packages and versions, or something else? You can definitely do this if you want, but maintaining parallel environments by hand is going to get tedious and error-prone fast. If people need to move between machines and keep everything in sync, they usually turn to something like packrat (which integrates with RStudio projects), but while it's a fantastically powerful tool it can also can have a steep learning curve.

Well, you provided me good advice! Okay, so my campus RStudio server version is 0.1.2 (rlang) and my desktop version of rlang is 0.2.1. So, when I check on updates within the campus RStudio version, it tells me that everything is up to date. Is there a way to "force" an update or will I have to consult with my university IT personnel? Very much appreciate your help btw. Thanks.

G

The latest version of rlang on CRAN right now is 0.2.1, so I suspect that your campus RStudio Server may be using its own local repository (or has some other setup that is keeping it from seeing the newer rlang). I think that means you need to talk to your university IT people.

In case it helps when you are talking to them: that version of rlang is quite out of date, and since rlang is an infrastructure package whose tools are being adopted throughout the extremely popular tidyverse collection of packages, having an old rlang is likely to break many other things (as you found out!).

Since this seems not to be an IDE problem, I'm going to recategorize/re-tag the question (you can do this too, if you don't like my choices! FAQ: How Do I Change Categories, Tags, and Title?)

1 Like

I agree with your recategorization. Much appreciated and thank you.
G