2016-09-20 8 views
1

설정 (나는 R 분산 아나콘다를 사용하고 있습니다) :아나콘다 R - Rcpp 오류

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" 
Rcpp -- 0.12.5 

최소 예 :

library(Rcpp) 
evalCpp("1+1") 

오류 : 내가 본

Error in dyn.load("/tmp/RtmpGI3wKi/sourcecpp_6c2722bad7ef/sourceCpp_1.so") : 
    unable to load shared object '/tmp/RtmpGI3wKi/sourcecpp_6c2722bad7ef/sourceCpp_1.so': 
    /tmp/RtmpGI3wKi/sourcecpp_6c2722bad7ef/sourceCpp_1.so: undefined symbol: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv 

stackoverflow에서 anaconda google groupshere과 매우 유사한 오류가 발생하지만 해결 방법에 대한 힌트는 없습니다.

답변

0

당신은 아나콘다에게 준 좋은 사람들과 이야기해야 할 것입니다. 데비안과 우분투에서 모든 것이 예상대로 "바로 작동"- 및 개발자의 일부가 해당 플랫폼 사용 주어진 예상 할 수있다 : 우분투 16.04를 실행 (중 하나) 내 워크 스테이션 (들)에

:

를 갓 출시 Rocker r-base 용기에
R> library(Rcpp) 
R> evalCpp("1+2") 
[1] 3 
R> 

동감을 (데비안 테스트를 실행하고 apt-get를 통해 Rcpp 당기는) :

$ docker run --rm -ti r-base /bin/bash 
[email protected]:/# apt-get update 
Get:2 http://security.debian.org testing/updates InRelease [68.2 kB]          
Get:1 http://debian.cs.binghamton.edu/debian sid InRelease [209 kB]           
Get:3 http://debian.cs.binghamton.edu/debian testing InRelease [251 kB]    
Get:4 http://debian.cs.binghamton.edu/debian testing-updates InRelease [124 kB] 
Get:5 http://debian.cs.binghamton.edu/debian sid/main amd64 Packages [9,671 kB] 
Get:6 http://debian.cs.binghamton.edu/debian testing/main amd64 Packages [10.4 MB] 
Fetched 20.7 MB in 4s (4,476 kB/s)       
Reading package lists... Done 
[email protected]:/# apt-get install r-cran-rcpp 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
The following additional packages will be installed: 
    r-cran-pkgkitten 
Suggested packages: 
    r-cran-inline 
The following NEW packages will be installed: 
    r-cran-pkgkitten r-cran-rcpp 
0 upgraded, 2 newly installed, 0 to remove and 102 not upgraded. 
Need to get 2,187 kB of archives. 
After this operation, 9,187 kB of additional disk space will be used. 
Do you want to continue? [Y/n] 
Get:1 http://debian.cs.binghamton.edu/debian testing/main amd64 r-cran-pkgkitten all 0.1.3-1 [18.3 kB] 
Get:2 http://debian.cs.binghamton.edu/debian testing/main amd64 r-cran-rcpp amd64 0.12.7-1 [2,169 kB] 
Fetched 2,187 kB in 0s (2,324 kB/s)  
debconf: delaying package configuration, since apt-utils is not installed 
Selecting previously unselected package r-cran-pkgkitten. 
(Reading database ... 16975 files and directories currently installed.) 
Preparing to unpack .../r-cran-pkgkitten_0.1.3-1_all.deb ... 
Unpacking r-cran-pkgkitten (0.1.3-1) ... 
Selecting previously unselected package r-cran-rcpp. 
Preparing to unpack .../r-cran-rcpp_0.12.7-1_amd64.deb ... 
Unpacking r-cran-rcpp (0.12.7-1) ... 
Setting up r-cran-pkgkitten (0.1.3-1) ... 
Setting up r-cran-rcpp (0.12.7-1) ... 
[email protected]:/# R 

R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" 
Copyright (C) 2016 The R Foundation for Statistical Computing 
Platform: x86_64-pc-linux-gnu (64-bit) 

R is free software and comes with ABSOLUTELY NO WARRANTY. 
You are welcome to redistribute it under certain conditions. 
Type 'license()' or 'licence()' for distribution details. 

    Natural language support but running in an English locale 

R is a collaborative project with many contributors. 
Type 'contributors()' for more information and 
'citation()' on how to cite R or R packages in publications. 

Type 'demo()' for some demos, 'help()' for on-line help, or 
'help.start()' for an HTML browser interface to help. 
Type 'q()' to quit R. 

> library(Rcpp) 
> evalCpp("1+2") 
[1] 3 
> 
+0

가 나는 아나콘다와 관련된 것으로 기대하고 있었다. 당신의 답변에 감사드립니다. – Radu

+0

CRAN에서 소스에서 Rcpp를 설치하면됩니다. 그게 효과가있다. (배포판 바이너리는 오래된 것일 수 있습니다. 대체물로 사용하십시오.) –

+0

소스에서 0.12.7 설치를 시도했습니다. (거의) 동일한 오류가 발생합니다. 아나콘다를 통해 R 관리에 대한 희망을 포기해야 할 것 같습니다. 다시 한번 감사드립니다. – Radu