重现:
- 按照https://github.com/yencarnacion/GCP-jupyter-notebook的 README 中的说明进行操作
打开一个 R jupyter notebook 并执行:
system("mkdir -p ~/anaconda3/lib/R/library", intern=TRUE)
system("echo R_LIBS=~/anaconda3/lib/R/library > ~/.Renviron", intern=TRUE)
* Then do a Kernel>Restart and in the first cell of your notebook put:
.libPaths("~/anaconda3/lib/R/library")
正如用户 ubuntu 所做的那样:
wget https://cran.rstudio.com/src/contrib/Rcpp_0.12.10.tar.gz
- 正如用户 ubuntu 所做的那样:
/usr/lib/anaconda/lib/R/bin/R CMD INSTALL --library=~/anaconda3/lib/R/library Rcpp_0.12.10.tar.gz
这是我得到的输出/usr/lib/anaconda/lib/R/bin/R CMD INSTALL --library=~/anaconda3/lib/R/library Rcpp_0.12.10.tar.gz
:
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c Date.cpp -o Date.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c Module.cpp -o Module.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c api.cpp -o api.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c attributes.cpp -o attributes.o
g++ -I/usr/lib/anaconda/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/lib/anaconda/include -fpic -I/usr/lib/anaconda/include -c barrier.cpp -o barrier.o
g++ -shared -L/usr/lib/anaconda/lib/R/lib -L/usr/lib/anaconda/lib -lgfortran -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -L/usr/lib/anaconda/lib/R/lib -lR
installing to /home/ubuntu/anaconda3/lib/R/library/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/ubuntu/anaconda3/lib/R/library/Rcpp/libs/Rcpp.so':
/home/ubuntu/anaconda3/lib/R/library/Rcpp/libs/Rcpp.so: undefined symbol: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/ubuntu/anaconda3/lib/R/library/Rcpp’
由于 Rcpp 问题,我无法解决devtools::install_github('rstudio/leaflet')
其他问题。