Package installation - persistent issues

Hi all,

Really hope you can help me. I cannot install a single package in R - it's been like this for a while and I have tried so many times to fix it and failed, I basically just started using Python instead... anyway, I really need to work with the lme4 package so now is the time to fix...

I have tried/confirmed the following points:

  1. I am logged in as the system admin (on a mac)
  2. I have tried suing sudo R in the console
  3. I have tried setting the lib path, setting the repo, having install dependencies set to true
  4. I have tried manually downloading and moving into library
  5. I have tried to update RStudio

Nothing has worked... can anyone please help me I think I am going mad! I have omitted some of the script because it went over my character limit... I can always post more if that's helpful

> install.packages("lme4")
also installing the dependency ‘minqa’

trying URL 'http://cran.rstudio.com/src/contrib/minqa_1.2.4.tar.gz'
Content type 'application/x-gzip' length 53548 bytes (52 KB)
==================================================
downloaded 52 KB

trying URL 'http://cran.rstudio.com/src/contrib/lme4_1.1-23.tar.gz'
Content type 'application/x-gzip' length 4137774 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

* installing *source* package ‘minqa’ ...
** package ‘minqa’ successfully unpacked and MD5 sums checked
** libs
gfortran   -fPIC  -g -O2  -c altmov.f -o altmov.o
dyld: Library not loaded: /usr/local/opt/isl/lib/libisl.19.dylib
  Referenced from: /usr/local/Cellar/gcc/8.2.0/libexec/gcc/x86_64-apple-darwin18.2.0/8.2.0/f951
  Reason: image not found
gfortran: internal compiler error: Abort trap: 6 signal terminated program f951
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew-core/issues> for instructions.
make: *** [altmov.o] Error 4
ERROR: compilation failed for package ‘minqa’
* removing ‘/usr/local/Cellar/r/3.5.2_2/lib/R/library/minqa’
* restoring previous ‘/usr/local/Cellar/r/3.5.2_2/lib/R/library/minqa’
Warning in install.packages :
  installation of package ‘minqa’ had non-zero exit status
* installing *source* package ‘lme4’ ...
** package ‘lme4’ successfully unpacked and MD5 sums checked
** libs
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/library/Rcpp/include" -I"/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -DNDEBUG -DEIGEN_DONT_VECTORIZE -fPIC  -g -O2  -c external.cpp -o external.o
In file included from external.cpp:8:
In file included from ./predModule.h:12:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:30:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/Dense:1:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/Core:535:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
******* [some of script omitted]

In file included from respModule.cpp:7:
In file included from ./respModule.h:12:
In file included from ./glmFamily.h:11:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:31:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/Sparse:27:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/OrderingMethods:71:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
In file included from respModule.cpp:7:
In file included from ./respModule.h:12:
In file included from ./glmFamily.h:11:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:31:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/Sparse:29:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/SparseCholesky:43:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
In file included from respModule.cpp:7:
In file included from ./respModule.h:12:
In file included from ./glmFamily.h:11:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:31:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/Sparse:32:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/SparseQR:35:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
In file included from respModule.cpp:7:
In file included from ./respModule.h:12:
In file included from ./glmFamily.h:11:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:31:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/Sparse:33:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/IterativeLinearSolvers:46:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
In file included from respModule.cpp:7:
In file included from ./respModule.h:12:
In file included from ./glmFamily.h:11:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:32:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/CholmodSupport:45:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
In file included from respModule.cpp:7:
In file included from ./respModule.h:12:
In file included from ./glmFamily.h:11:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:35:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/unsupported/Eigen/KroneckerProduct:34:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
In file included from respModule.cpp:7:
In file included from ./respModule.h:12:
In file included from ./glmFamily.h:11:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:39:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/unsupported/Eigen/Polynomials:135:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
In file included from respModule.cpp:7:
In file included from ./respModule.h:12:
In file included from ./glmFamily.h:11:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigen.h:25:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/RcppEigenForward.h:40:
In file included from /usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/unsupported/Eigen/SparseExtra:51:
/usr/local/Cellar/r/3.5.2_2/lib/R/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
17 warnings generated.
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -L/usr/local/Cellar/r/3.5.2_2/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o lme4.so external.o glmFamily.o optimizer.o predModule.o respModule.o -L/usr/local/Cellar/r/3.5.2_2/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/Cellar/r/3.5.2_2/lib/R/library/lme4/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  object 'vI' not found
ERROR: lazy loading failed for package ‘lme4’
* removing ‘/usr/local/Cellar/r/3.5.2_2/lib/R/library/lme4’
* restoring previous ‘/usr/local/Cellar/r/3.5.2_2/lib/R/library/lme4’
Warning in install.packages :
  installation of package ‘lme4’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/5j/sv284zmd6d9bs_k13dxn9fmh0000gn/T/RtmpjUQ1Kg/downloaded_packages’
Updating HTML index of packages in '.Library'
Warning in install.packages :
  cannot create file '/usr/local/Cellar/r/3.5.2_2/lib/R/doc/html/packages.html', reason 'Permission denied'
Warning in install.packages :
  cannot update HTML package index
1 Like

This not very informative error message usually appears when you have an issue with your base R installation, some people have reported fixing it by reinstalling the MASS package but if that doesn't help, I would recommend completely removing your R installation including your package library and installing again.

So just in case anyone else has this issue I found out the issue. The packages html index in my mac did not have permission to be updated by Admins - only by the system and RStudio was trying to write to it as me. I changed the permissions and it works now - I have a feeling the change in permissions coincides with an apple update.

2 Likes

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