【问题标题】:Rcpp package in R not install ubuntu 14.04R中的Rcpp包不安装ubuntu 14.04
【发布时间】:2017-03-11 16:42:59
【问题描述】:

请帮助我。我尝试使用

安装Rcpp
sudo apt-get install r-cran-rcpp

从 R-Studio 得到同样的错误:

> install.packages("Rcpp", dependencies=TRUE)
Installing package into ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘highlight’

trying URL 'http://cran.rstudio.com/src/contrib/highlight_0.4.7.tar.gz'
Content type 'application/x-gzip' length 356443 bytes (348 KB)
==================================================
downloaded 348 KB

trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.9.tar.gz'
Content type 'application/x-gzip' length 2372283 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

* installing *source* package ‘highlight’ ...
** package ‘highlight’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASBeautifier.cpp -o ASBeautifier.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASEnhancer.cpp -o ASEnhancer.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASFormatter.cpp -o ASFormatter.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASResource.cpp -o ASResource.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASStreamIterator.cpp -o ASStreamIterator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Matcher.cpp -o Matcher.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Pattern.cpp -o Pattern.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ansigenerator.cpp -o ansigenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c bbcodegenerator.cpp -o bbcodegenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c codegenerator.cpp -o codegenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c configurationreader.cpp -o configurationreader.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ctagsreader.cpp -o ctagsreader.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c datadir.cpp -o datadir.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c documentstyle.cpp -o documentstyle.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c elementstyle.cpp -o elementstyle.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c highlight_wrapper.cpp -o highlight_wrapper.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c htmlgenerator.cpp -o htmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c languagedefinition.cpp -o languagedefinition.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c latexgenerator.cpp -o latexgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c platform_fs.cpp -o platform_fs.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c preformatter.cpp -o preformatter.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c render.cpp -o render.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c rtfgenerator.cpp -o rtfgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c stringtools.cpp -o stringtools.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c stylecolour.cpp -o stylecolour.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c svggenerator.cpp -o svggenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c texgenerator.cpp -o texgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c xhtmlgenerator.cpp -o xhtmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c xmlgenerator.cpp -o xmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c xterm256generator.cpp -o xterm256generator.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o highlight.so ASBeautifier.o ASEnhancer.o ASFormatter.o ASResource.o ASStreamIterator.o Matcher.o Pattern.o ansigenerator.o bbcodegenerator.o codegenerator.o configurationreader.o ctagsreader.o datadir.o documentstyle.o elementstyle.o highlight_wrapper.o htmlgenerator.o languagedefinition.o latexgenerator.o platform_fs.o preformatter.o render.o rtfgenerator.o stringtools.o stylecolour.o svggenerator.o texgenerator.o xhtmlgenerator.o xmlgenerator.o xterm256generator.o -L/usr/lib/R/lib -lR
installing to /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs/highlight.so':
  /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs/highlight.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight’
Warning in install.packages :
  installation of package ‘highlight’ had non-zero exit status
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Date.cpp -o Date.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Module.cpp -o Module.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c api.cpp -o api.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c attributes.cpp -o attributes.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c barrier.cpp -o barrier.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -L/usr/lib/R/lib -lR
installing to /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so':
  /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp’
Warning in install.packages :
  installation of package ‘Rcpp’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpsPMzSK/downloaded_packages’
> install.packages("Rcpp", dependencies=TRUE)
Installing package into ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘highlight’

trying URL 'http://cran.rstudio.com/src/contrib/highlight_0.4.7.tar.gz'
Content type 'application/x-gzip' length 356443 bytes (348 KB)
==================================================
downloaded 348 KB

trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.9.tar.gz'
Content type 'application/x-gzip' length 2372283 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

* installing *source* package ‘highlight’ ...
** package ‘highlight’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASBeautifier.cpp -o ASBeautifier.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASEnhancer.cpp -o ASEnhancer.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASFormatter.cpp -o ASFormatter.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASResource.cpp -o ASResource.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ASStreamIterator.cpp -o ASStreamIterator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Matcher.cpp -o Matcher.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Pattern.cpp -o Pattern.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ansigenerator.cpp -o ansigenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c bbcodegenerator.cpp -o bbcodegenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c codegenerator.cpp -o codegenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c configurationreader.cpp -o configurationreader.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ctagsreader.cpp -o ctagsreader.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c datadir.cpp -o datadir.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c documentstyle.cpp -o documentstyle.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c elementstyle.cpp -o elementstyle.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c highlight_wrapper.cpp -o highlight_wrapper.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c htmlgenerator.cpp -o htmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c languagedefinition.cpp -o languagedefinition.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c latexgenerator.cpp -o latexgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c platform_fs.cpp -o platform_fs.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c preformatter.cpp -o preformatter.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c render.cpp -o render.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c rtfgenerator.cpp -o rtfgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c stringtools.cpp -o stringtools.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c stylecolour.cpp -o stylecolour.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c svggenerator.cpp -o svggenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c texgenerator.cpp -o texgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c xhtmlgenerator.cpp -o xhtmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c xmlgenerator.cpp -o xmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG     -I. -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c xterm256generator.cpp -o xterm256generator.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o highlight.so ASBeautifier.o ASEnhancer.o ASFormatter.o ASResource.o ASStreamIterator.o Matcher.o Pattern.o ansigenerator.o bbcodegenerator.o codegenerator.o configurationreader.o ctagsreader.o datadir.o documentstyle.o elementstyle.o highlight_wrapper.o htmlgenerator.o languagedefinition.o latexgenerator.o platform_fs.o preformatter.o render.o rtfgenerator.o stringtools.o stylecolour.o svggenerator.o texgenerator.o xhtmlgenerator.o xmlgenerator.o xterm256generator.o -L/usr/lib/R/lib -lR
installing to /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs/highlight.so':
  /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs/highlight.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight’
Warning in install.packages :
  installation of package ‘highlight’ had non-zero exit status
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Date.cpp -o Date.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Module.cpp -o Module.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c api.cpp -o api.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c attributes.cpp -o attributes.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c barrier.cpp -o barrier.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -L/usr/lib/R/lib -lR
installing to /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so':
  /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp’
Warning in install.packages :
  installation of package ‘Rcpp’ had non-zero exit status

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

【问题讨论】:

  • 您是使用sudo apt-get install r-base 安装R 还是从另一台机器复制它?看到这个questionanswer
  • 是的,已经安装了 sudo apt-get install r-base 并在卸载后重新安装了 R,如stackoverflow.com/questions/20336644/… 中所述,甚至删除了 R 中 .libs 命令之后列出的文件夹。几天前我进行了更新,ggplot 安装在 Rcpp 上因同样的错误而崩溃,但已重新安装所有内容。错误仍然存​​在。

标签: r ubuntu-14.04 rcpp


【解决方案1】:

此版本的 Rcpp不是通过 apt-get 作为二进制文件安装,而是来自源:/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so

错误消息undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE 表明您的编译器不匹配 -- 以及较旧和较新的 C++ 编译器。

我建议你删除这个版本(例如rm -r ~/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/),并确保你没有安装其他版本。然后从源代码安装应该可以正常工作。

您通常可以选择使用 Ubuntu 14.04 提供的预构建版本。或者您可以将 Ubuntu 升级到 16.04 版本,甚至 16.10。所有版本都应该有工作的 Rcpp 版本——如果你有所需工具的工作和一致版本(即g++),从源代码安装也应该工作得很好。

【讨论】:

  • 感谢您的回复。我尝试使用在谷歌上找到的不同解决方案卸载和安装 6 次。我确实有一个正在工作的 g++。最后,我从源代码安装了 R 并为 RStudio 设置了此版本的路径。 Rcpp 在安装时成功退出。
  • 请订阅 r-sig-debian 并在那里发帖——这没有任何意义。成千上万的人毫无问题地使用了这些二进制文件。
  • 不用说,我自己使用 Ubuntu(但每六个月升级一次,所以目前在我的主机上使用 16.10)。这东西很管用,所以你在某处做了一些不寻常的事情。
猜你喜欢
  • 2023-03-20
  • 1970-01-01
  • 2016-04-30
  • 1970-01-01
  • 2017-01-20
  • 1970-01-01
  • 1970-01-01
  • 2023-03-07
  • 2015-06-20
相关资源
最近更新 更多