kann nicht kompiliert RcppArmadillo in R
Ich habe ein problem, kompilieren RcppArmadillo. Dies ist das Ergebnis, wenn ich versuche das Paket zu installieren:
> install.packages("RcppArmadillo")
Installing package(s) into ‘/home/*****/R/i686-pc-linux-gnu-library/2.15’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/RcppArmadillo_0.3.4.4.tar.gz'
Content type 'application/x-gzip' length 742125 bytes (724 Kb)
opened URL
==================================================
downloaded 724 Kb
Loading required package: survival
Loading required package: stats
Loading required package: utils
Loading required package: graphics
Loading required package: splines
Hmisc library by Frank E Harrell Jr
Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview')
to see overall documentation.
NOTE:Hmisc no longer redefines [.factor to drop unused levels when
subsetting. To get the old behavior of Hmisc type dropUnusedLevels().
Attaching package: ‘Hmisc’
The following object(s) are masked from ‘package:survival’:
untangle.specials
The following object(s) are masked from ‘package:base’:
format.pval, round.POSIXt, trunc.POSIXt, units
Welcome at Sun Dec 2 18:54:49 2012
* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/******/R/i686-pc-linux-gnu-library/2.15/Rcpp/include" -I../inst/include -fpic -O3 -pipe -g -c RcppArmadillo.cpp -o RcppArmadillo.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/******/R/i686-pc-linux-gnu-library/2.15/Rcpp/include" -I../inst/include -fpic -O3 -pipe -g -c fastLm.cpp -o fastLm.o
Loading required package: survival
Loading required package: stats
Loading required package: utils
Loading required package: graphics
Loading required package: splines
Hmisc library by Frank E Harrell Jr
Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview')
to see overall documentation.
NOTE:Hmisc no longer redefines [.factor to drop unused levels when
subsetting. To get the old behavior of Hmisc type dropUnusedLevels().
Attaching package: ‘Hmisc’
The following object(s) are masked from ‘package:survival’:
untangle.specials
The following object(s) are masked from ‘package:base’:
format.pval, round.POSIXt, trunc.POSIXt, units
g++ -shared -o RcppArmadillo.so RcppArmadillo.o fastLm.o Welcome at Sun Dec 2 18:55:06 2012
-L/home/******/R/i686-pc-linux-gnu-library/2.15/Rcpp/lib -lRcpp -Wl,-rpath,/home/******/R/i686-pc-linux-gnu-library/2.15/Rcpp/lib -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
Loading required package: survival
Loading required package: stats
Loading required package: utils
Loading required package: graphics
Loading required package: splines
Hmisc library by Frank E Harrell Jr
Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview')
to see overall documentation.
NOTE:Hmisc no longer redefines [.factor to drop unused levels when
subsetting. To get the old behavior of Hmisc type dropUnusedLevels().
Attaching package: ‘Hmisc’
The following object(s) are masked from ‘package:survival’:
untangle.specials
The following object(s) are masked from ‘package:base’:
format.pval, round.POSIXt, trunc.POSIXt, units
g++: error: Welcome: No such file or directory
g++: error: at: No such file or directory
g++: error: Sun: No such file or directory
g++: error: Dec: No such file or directory
g++: error: 2: No such file or directory
g++: error: 18:55:08: No such file or directory
g++: error: 2012: No such file or directory
make: *** [RcppArmadillo.so] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/home/****/R/i686-pc-linux-gnu-library/2.15/RcppArmadillo’
Warning in install.packages :
installation of package ‘RcppArmadillo’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpDAngtR/downloaded_packages
'
Ich bin mit R version 2.15.2 auf Ubuntu 12.04.
Zuerst dachte ich, dass einige Abhängigkeiten fehlen, aber die habe ich installiert Armadillo (libarmadillo2 v2.4.2) über den synaptic package manager, auch g++ ist installiert (v4.6.3). Ich bin nicht vertraut mit c++, also ich weiß nicht, ob ich vielleicht brauchen einige zusätzliche Pakete. Jedoch ist die Installation Rcpp funktioniert einwandfrei.
Ich wäre wirklich froh wenn jemand mir helfen könnte.
- Verwenden Sie eine
.Rprofile
? Starten Sie R mitR --vanilla
, dann die Installation. - Vielen Dank für den tipp. R--Vanille gearbeitet. Vielen Dank 🙂
Du musst angemeldet sein, um einen Kommentar abzugeben.
install.packages
undR CMD INSTALL
wird (re)starten Sie R und Lesen Sie Ihre.Rprofile
. Daher sollten Sie wrappenif (interactive()) { }
um code in Ihrem.Rprofile
- Datei, die Sie möchten, dass nur Sie den interaktiven Sitzungen (z.B.library
oderrequire
Anrufe).Andernfalls müssen Sie starten Sie R mit der
--vanilla
Flagge vor der Verwendunginstall.packages()
oder verwendenR --vanilla CMD INSTALL
von bash.Was auf der Erde war, der Befehl, den Sie erteilt zu bekommen
zurück?
Wissen Sie, wie Sie bauen ein R-Paket? Haben Sie jemals getan
R CMD INSTALL ....
?Ich bin zufällig zu entwickeln, diese Pakete unter Ubuntu 12.* also ich bin ziemlich sicher, dass dies funktioniert.
Darüber hinaus bin ich mir nicht sicher, wie viel das Lesen der Dokumentation, die Sie versucht aber nirgendwo schlagen wir installieren
libarmadillo
um RcppArmadillo.Das Paket bietet einen eigenen Satz von Armadillo Quellen, für deren Nutzung sowie für die anderen R-Paketen mit RcppArmadillo.
Ist und dass Funktioniert Einfach (TM), da es über 20 Pakete auf CRAN allein die Nutzung von RcppArmadillo.