Paket installieren-Fehler: compilation failed
Habe ich vor kurzem aktualisiert, R auf 3.1.0. Ich versuchte mich zu bewegen, meine Pakete nach 3.1 innerhalb des R.-Framework (ich bin mit OSX Mavericks) und irgendwie ein Chaos, so hat eine vollständige deinstallation von allem, bevor Sie eine saubere Installation.
Bei der Neuinstallation der Pakete, die ich hatte keine Probleme, bis ich auf die forecast
- Paket, welches die folgende Fehlermeldung:
package ‘forecast’ is available as a source package but not as a binary
Warning in install.packages :
package ‘forecast’ is not available (for R version 3.1.0)
Hatte ich eigentlich R 3.1.0 und prognostizieren und die hts zusammen zu arbeiten, die vor der Neuinstallation, so dass ich vermute das problem rührt von etwas, was ich getan habe, eher als ein Kompatibilitäts-problem.
Lief ich die folgenden, um zu sehen, wenn ich konnte ausgraben einige weitere details über die Installation fehl: install.packages("forecast", type = "source", verbose = T, quiet = F)
Den output von denen ist ein wenig über mich, aber helfen bei der Diagnose:
system (cmd0): /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL
trying URL 'http://cran.rstudio.com/src/contrib/forecast_5.3.tar.gz'
Content type 'application/x-gzip' length 150395 bytes (146 Kb)
opened URL
==================================================
downloaded 146 Kb
foundpkgs: forecast, /var/folders/0y/_13fkvws0tn5xh4m8wsymkdh0000gp/T//RtmpzTzSpG/downloaded_packages/forecast_5.3.tar.gz
files: /var/folders/0y/_13fkvws0tn5xh4m8wsymkdh0000gp/T//RtmpzTzSpG/downloaded_packages/forecast_5.3.tar.gz
* installing *source* package ‘forecast’ ...
** package ‘forecast’ 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 -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c calcBATS.cpp -o calcBATS.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c calcTBATS.cpp -o calcTBATS.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c etsTargetFunction.cpp -o etsTargetFunction.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c etsTargetFunctionWrapper.cpp -o etsTargetFunctionWrapper.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c etscalc.c -o etscalc.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c etspolyroot.c -o etspolyroot.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c makeBATSMatrices.cpp -o makeBATSMatrices.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c makeTBATSMatrices.cpp -o makeTBATSMatrices.o
makeTBATSMatrices.cpp:11:6: warning: unused variable 'lengthSeasonal' [-Wunused-variable]
int lengthSeasonal = 0;
^
1 warning generated.
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c updateMatrices.cpp -o updateMatrices.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppArmadillo/include" -fPIC -Wall -mtune=core2 -g -O2 -c updateTBATSMatrices.cpp -o updateTBATSMatrices.o
updateTBATSMatrices.cpp:38:10: warning: unused variable 'gammaVector' [-Wunused-variable]
double *gammaVector;
^
1 warning generated.
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o forecast.so calcBATS.o calcTBATS.o etsTargetFunction.o etsTargetFunctionWrapper.o etscalc.o etspolyroot.o makeBATSMatrices.o makeTBATSMatrices.o updateMatrices.o updateTBATSMatrices.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [forecast.so] Error 1
ERROR: compilation failed for package ‘forecast’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/forecast’
Warning in install.packages :
installation of package ‘forecast’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/0y/_13fkvws0tn5xh4m8wsymkdh0000gp/T/RtmpzTzSpG/downloaded_packages’
Ich würde wirklich zu schätzen einige Hilfe hier. Viel von dem code hab ich gearbeitet in letzter Zeit setzt auf Funktionen, die in der Prognose.
r-sig-mac
Archive sind voll von Anweisungen, wie zu kompilieren R
Pakete unter Mavericks.
InformationsquelleAutor Jonathan Mulligan | 2014-04-17
Du musst angemeldet sein, um einen Kommentar abzugeben.
Hier ist was ich getan habe (RcppArmadillo Compile-Fehler auf OS X Mavericks)
Install gfortran von Gebräu (wenn Sie nicht haben, Gebräu, Google es. Die Installation ist einfach):
brew install gfortran
Wenn es installiert ist, aktualisieren Sie auf die neueste mit:
brew upgrade gfortran
Führen Sie dann einen der folgenden Schritte aus:
ln -s /usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgfortran.* /usr/local/lib/
oder fügen Sie diese Zeile zu der
~/.R/Makevars
Datei:FLIBS=-L/usr/local/Cellar/gfortran/4.8.2/gfortran
Habe ich die zweite option.
Laufen nun
install.packages("forecast", type = "source")
wieder und es sollte funktionieren.InformationsquelleAutor mchangun
In meinem Fall, ich habe versucht, installieren Sie die neueste version von {Prognose} - Paket mit
devtools::install_github("robjhyndman/forecast")
und hatte den ähnlichen Fehler.Dann, obwohl ich nicht sicher bin, ob das, was ich gemacht habe ist Recht, folgende mchangun Antwort habe ich wie folgt und der Fehler wurde behoben:
brew upgrade gcc
Fehler: gcc 5.2.0 bereits installiert
gcc --version
Konfiguriert mit: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.0.0
Thread-Modell: posix
ls /usr/local/Cellar/gcc
4.9.2 4.9.2_1 5.2.0
Fügen Sie die Zeile
FLIBS=-L/usr/local/Cellar/gcc/5.2.0
zu den~/.R/Makevars
DateiLaufen
devtools::install_github("robjhyndman/forecast")
- und es funktionierte.InformationsquelleAutor user3081234
Terminal
6.3.0_1
Rstudio:
InformationsquelleAutor suman kishore Choudhary
Download gfortran aus https://gcc.gnu.org/wiki/GFortranBinariesMacOS
sudo rm -r /usr/local/gfortran /usr/local/bin/gfortran
Dann install gfortran
sudo vi /Library/Frameworks/R.-framework/Resources/etc/Makeconf
ändern alle gfortran-4.8 gfortran
FC = gfortran
FCFLAGS = -Wall-g -O2 $(LTO)
FCLIBS =
F77 = gfortran
F77_VISIBILITY =
FFLAGS = -g -O2 $(LTO)
FLIBS = -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 -lgfortran -lquadmath -lm
ändern oben FLIBS zu den unten
FLIBS = -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
InformationsquelleAutor bioguo