I'm trying to install MVN package:
> install.packages("MVN")
probando la URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/MVN_5.5.tgz'
Content type 'application/x-gzip' length 382369 bytes (373 KB)
==================================================
downloaded 373 KB
The downloaded binary packages are in
/var/folders/79/xxghr9tj65789879v41wrp6h0000gn/T//Rtmp4bpod5/downloaded_packages
but when I do library(MVN) it says me that Error: package or namespace load failed for ‘MVN’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘rrcov’
so when I try to install it:
> install.packages("rrcov")
There is a binary version available but the source version is later:
binary source needs_compilation
rrcov 1.4-4 1.4-7 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
installing the source package ‘rrcov’
probando la URL 'https://cran.rstudio.com/src/contrib/rrcov_1.4-7.tar.gz'
Content type 'application/x-gzip' length 965680 bytes (943 KB)
==================================================
downloaded 943 KB
* installing *source* package ‘rrcov’ ...
** package ‘rrcov’ successfully unpacked and MD5 sums checked
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c R-rng4ftn.c -o R-rng4ftn.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c covOPW.c -o covOPW.o
gfortran -fPIC -g -O2 -c ds11.f -o ds11.o
gfortran: warning: couldn’t understand kern.osversion ‘15.6.0
f951: internal compiler error: Illegal instruction: 4
f951: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
make: *** [ds11.o] Abort trap: 6
ERROR: compilation failed for package ‘rrcov’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rrcov’
Warning in install.packages :
installation of package ‘rrcov’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/79/xxghr9tj65789879v41wrp6h0000gn/T/Rtmp4bpod5/downloaded_packages’
I've searched how to fix that, installing XCode, reinstalling r, and nothing. I need this package to perfom some multivariate analysis for my thesis but I do not know how to fix it.
Any help will be appreciated.
Thanks!
I am using an iOS 10.11.6
Related
I'm trying to install "randomForest" on R 3.6.3 as below:
urlPackage <- "https://cran.r-project.org/src/contrib/Archive/randomForest/randomForest_4.6-14.tar.gz"
install.packages(urlPackage, repos=NULL, type="source")
(install.packages('randomForest') throws the error: package 'randomForest' is not available (for R version 3.6.3))
The lines above, however, give me the following error:
trying URL 'https://cran.r-project.org/src/contrib/Archive/randomForest/randomForest_4.6-14.tar.gz'
Content type 'application/x-gzip' length 80074 bytes (78 KB)
==================================================
downloaded 78 KB
* installing *source* package ‘randomForest’ ...
** package ‘randomForest’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc-8 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -mtune=native -g -O2 -Wall -pedantic -Wconversion -c classTree.c -o classTree.o
/bin/sh: gcc-8: command not found
make: *** [classTree.o] Error 127
ERROR: compilation failed for package ‘randomForest’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/randomForest’
Warning in install.packages :
installation of package ‘/var/folders/66/3s4r17rx7ln0b1p8tyrmws780000gn/T//RtmpDOHynP/downloaded_packages/randomForest_4.6-14.tar.gz’ had non-zero exit status
Does anyone have any idea how to solve this? I'm on macOS Catalina (ver 10.15.7)
You should install the gcc8 tool:
sudo port install gcc8
Related Links
MacPorts - GCC8
YouTube - Install GCC 8 with Homebrew on macOS
When installing Swirl using R Studio on Windows 10 (64-bit), the Swirl package installs but the running library (swirl) cannot be found. The system gives an error that rlang gets removed while installing Swirl:
Error in rlang() : could not find function "rlang"
install.packages("rlang")
Installing package into ‘C:/Users/***/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
There is a binary version available but the source
version is later:
binary source needs_compilation
rlang 0.3.2 0.3.3 TRUE
installing the source package ‘rlang’
trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.3.3.tar.gz'
Content type 'application/x-gzip' length 859027 bytes (838 KB)
downloaded 838 KB
installing source package 'rlang' ...
** package 'rlang' successfully unpacked and MD5 sums checked
** libs
C:/PROGRA~1/R/R-35~1.3/etc/x64/Makeconf:230: warning: overriding recipe for target '.m.o'
C:/PROGRA~1/R/R-35~1.3/etc/x64/Makeconf:223: warning: ignoring old recipe for target '.m.o'
c:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-35~1.3/include" -DNDEBUG -I./lib/ -O2 -Wall -std=gnu99 -mtune=generic -c capture.c -o capture.o
process_begin: CreateProcess(NULL, c:/Rtools/mingw_64/bin/gcc -IC:/PROGRA~1/R/R-35~1.3/include -DNDEBUG -I./lib/ -O2 -Wall -std=gnu99 -mtune=generic -c capture.c -o capture.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [C:/PROGRA~1/R/R-35~1.3/etc/x64/Makeconf:208: capture.o] Error 2
ERROR: compilation failed for package 'rlang'
Nevermind, fixed it. Will write up comment explaining fix tn.
I am trying to install the geometric morphometrics package in R, but whenever I try to install it, I get the following error message:
> install.packages("geomorph")
There is a binary version available but the source version is later: binary source needs_compilation geomorph 3.0.5 3.0.6 FALSE
installing the source package ‘geomorph’
trying URL 'https://cran.rstudio.com/src/contrib/geomorph_3.0.6.tar.gz'
Content type 'application/x-gzip' length 545863 bytes (533 KB)
==================================================
downloaded 533 KB
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'default/America/Toronto'
* installing *source* package ‘geomorph’ ...
** package ‘geomorph’ successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘mvtnorm’
ERROR: lazy loading failed for package ‘geomorph’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/geomorph’
Warning in install.packages :
installation of package ‘geomorph’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/4p/m9yg9rg94v13j49zxnp9kzzh0000gn/T/RtmpCBCHAn/downloaded_packages’
I'm using RStudio but I tried it in just R, I've updated to the latest MacOS HighSierra, I have tried restarting the applications, I've installed and restarted XQuartz, and so far nothing has worked.
I'm running R on an early 2015 MacBook Air, I'm fresh out of ideas. Any suggestions are welcome.
EDIT:
Trying to install mvtnorm also failed, producing the following:
> install.packages("mvtnorm")
There is a binary version available but the source version is later:
binary source needs_compilation
mvtnorm 1.0-6 1.0-7 TRUE
Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘mvtnorm’
trying URL 'https://cran.rstudio.com/src/contrib/mvtnorm_1.0-7.tar.gz'
Content type 'application/x-gzip' length 159381 bytes (155 KB)
==================================================
downloaded 155 KB
* installing *source* package ‘mvtnorm’ ...
** package ‘mvtnorm’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG - I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC - Wall -mtune=core2 -g -O2 -c C_FORTRAN_interface.c -o C_FORTRAN_interface.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG - I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC - Wall -mtune=core2 -g -O2 -c miwa.c -o miwa.o
gfortran-4.8 -fPIC -g -O2 -c mvt.f -o mvt.o
make: gfortran-4.8: No such file or directory
make: *** [mvt.o] Error 1
ERROR: compilation failed for package ‘mvtnorm’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/mvtnorm’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/mvtnorm’
Warning in install.packages :
installation of package ‘mvtnorm’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/4p/m9yg9rg94v13j49zxnp9kzzh0000gn/T/RtmpCBCHAn/downloaded_packages’
today I upgraded to R 3.3.0... oh boy.. wish I stayed at the previous version.
The last few hours I have been trying to solve some issues to install car and sjPlot, but problems remain.
When installing sjPlot everything goes fine, but when setting the library, I get this error:
error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘quantreg’
Error: package or namespace load failed for ‘sjPlot’
Something similar occurs with car, during installation:
installing the source package ‘quantreg’
trying URL 'https://lib.ugent.be/CRAN/src/contrib/quantreg_5.26.tar.gz'
Content type 'unknown' length 1720216 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
* installing *source* package ‘quantreg’ ...
** package ‘quantreg’ successfully unpacked and MD5 sums checked
** libs
gfortran-4.8 -fPIC -g -O2 -c akj.f -o akj.o
gfortran-4.8 -fPIC -g -O2 -c boot.f -o boot.o
gfortran-4.8 -fPIC -g -O2 -c bound.f -o bound.o
gfortran-4.8 -fPIC -g -O2 -c boundc.f -o boundc.o
gfortran-4.8 -fPIC -g -O2 -c brute.f -o brute.o
/var/folders/lp/ndh7gxxs6vn0ldd3fqblq7k80000gn/T//ccbxq8DR.s:37:expecting string instruction after `rep'
make: *** [brute.o] Error 1
ERROR: compilation failed for package ‘quantreg’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantreg’
The downloaded source packages are in
‘/private/var/folders/lp/ndh7gxxs6vn0ldd3fqblq7k80000gn/T/RtmpNPzXls/downloaded_packages’
Warning message:
In install.packages("car") :
installation of package ‘quantreg’ had non-zero exit status
Any thoughts on what I can do to solve this??
Thanks
install.packages('forecast')
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/forecast_5.4.tar.gz'
Content type 'application/x-gzip' length 150965 bytes (147 Kb)
opened URL
downloaded 147 Kb
installing source package ‘forecast’ ...
package ‘forecast’ successfully unpacked and MD5 sums checked
libs
g++ -m64 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppArmadillo/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c calcBATS.cpp -o calcBATS.o
In file included from calcBATS.cpp:1:0:
calcBATS.h:36:27: fatal error: RcppArmadillo.h: No such file or directory
#include
^
compilation terminated.
make: * [calcBATS.o] Error 1
ERROR: compilation failed for package ‘forecast’
* removing ‘/usr/lib64/R/library/forecast’
The downloaded source packages are in
‘/tmp/RtmpJRX18M/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("forecast") :
installation of package ‘forecast’ had non-zero exit status
Looks like there is a missing package dependence, RcppArmadillo.
install.packages("RcppArmadillo")
Then:
install.packages('forecast')
add within your lifecycle configuration
conda install -y -c r r-forecast