簡體   English   中英

R包'Boom'無法在Ubuntu linux上安裝

[英]R package 'Boom' fails to install on Ubuntu linux

出於某種原因,R包“Boom”無法在我的系統上安裝(Ubuntu 14.04)。 R和所有其他軟件包都是最新版本(包括'BH')。 由於'Boom'在CRAN上,應該預期軟件包將安裝沒有任何問題(例如, 在R上安裝軟件包,需要OSX的C ++ 11支持 )。 但是,我不知道如何追查原因:我的設置可能與“標准”有什么不同,因此無法安裝包? 去哪兒看?

以下是安裝日志的違規部分:

g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I. -I../inst/include -IBmath -Imath/cephes -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DRLANGUAGE  -I"/home/mbojan/R/library/3.2/BH/include"   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Models/PosteriorSamplers/DirichletPosteriorSampler.cpp -o Models/PosteriorSamplers/DirichletPosteriorSampler.o
Models/PosteriorSamplers/DirichletPosteriorSampler.cpp: In member function ‘void BOOM::DirichletPosteriorSampler::draw_impl(const std::vector<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> >&, const BOOM::Vector&)’:
Models/PosteriorSamplers/DirichletPosteriorSampler.cpp:90:65: error: no matching function for call to ‘std::vector<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> >::erase(__gnu_cxx::__normal_iterator<const std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>*, std::vector<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> > >)’
         other_implementations.erase(impl.begin() + which_sampler);
                                                                 ^
Models/PosteriorSamplers/DirichletPosteriorSampler.cpp:90:65: note: candidates are:
In file included from /usr/include/c++/4.8/vector:69:0,
                 from ../inst/include/Models/DataTypes.hpp:24,
                 from ../inst/include/Models/ParamTypes.hpp:22,
                 from ../inst/include/Models/ModelTypes.hpp:22,
                 from ../inst/include/Models/DirichletModel.hpp:22,
                 from ../inst/include/Models/PosteriorSamplers/DirichletPosteriorSampler.hpp:23,
                 from Models/PosteriorSamplers/DirichletPosteriorSampler.cpp:18:
/usr/include/c++/4.8/bits/vector.tcc:134:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator) [with _Tp = std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>; _Alloc = std::allocator<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>*, std::vector<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>*]
     vector<_Tp, _Alloc>::
     ^
/usr/include/c++/4.8/bits/vector.tcc:134:5: note:   no known conversion for argument 1 from ‘__gnu_cxx::__normal_iterator<const std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>*, std::vector<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> > >’ to ‘std::vector<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> >::iterator {aka __gnu_cxx::__normal_iterator<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>*, std::vector<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> > >}’
/usr/include/c++/4.8/bits/vector.tcc:146:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::iterator) [with _Tp = std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>; _Alloc = std::allocator<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>*, std::vector<std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::shared_ptr<BOOM::DirichletSampler::DirichletSamplerImpl>*]
     vector<_Tp, _Alloc>::
     ^
/usr/include/c++/4.8/bits/vector.tcc:146:5: note:   candidate expects 2 arguments, 1 provided
make: *** [Models/PosteriorSamplers/DirichletPosteriorSampler.o] Error 1
ERROR: compilation failed for package ‘Boom’

嘗試更新的編譯器:安裝g++-4.9並設置

CXX=g++-4.9
CXX1X=g++-4.9

~/.R/Makevars/etc/R/Makeconf 我昨天剛剛在一台機器上重建了Boom(雖然這是一個Ubuntu 15.04到15.10升級,由於切換到g ++ - 5需要重建)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM