简体   繁体   English

无法在Debian Jessie上安装roxygen2

[英]Cannot install roxygen2 on Debian Jessie

When I try to install roxygen2 I get: 当我尝试安装roxygen2我得到:

> sudo Rscript -e 'install.packages("roxygen2", repos="http://mirrors.dotsrc.org/cran/")'         
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'http://mirrors.dotsrc.org/cran/src/contrib/roxygen2_5.0.1.tar.gz'
Content type 'text/plain' length 106197 bytes (103 Kb)
opened URL
==================================================
downloaded 103 Kb

* installing *source* package ‘roxygen2’ ...
** package ‘roxygen2’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG   -I"/usr/lib/R/site-library/Rcpp/include"   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
g++ -I/usr/share/R/include -DNDEBUG   -I"/usr/lib/R/site-library/Rcpp/include"   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c isComplete.cpp -o isComplete.o
g++ -I/usr/share/R/include -DNDEBUG   -I"/usr/lib/R/site-library/Rcpp/include"   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c leadingSpaces.cpp -o leadingSpaces.o
g++ -I/usr/share/R/include -DNDEBUG   -I"/usr/lib/R/site-library/Rcpp/include"   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c parser2.cpp -o parser2.o
parser2.cpp: In function ‘Rcpp::CharacterVector find_includes(std::string)’:
parser2.cpp:165:35: error: too many arguments to function ‘void Rcpp::stop(const string&)’
     stop("Failed to open %s", path);
                                   ^
In file included from /usr/lib/R/site-library/Rcpp/include/RcppCommon.h:131:0,
                 from /usr/lib/R/site-library/Rcpp/include/Rcpp.h:27,
                 from parser2.cpp:1:
/usr/lib/R/site-library/Rcpp/include/Rcpp/exceptions.h:195:17: note: declared here
     inline void stop(const std::string& message) {
                 ^
/usr/lib/R/etc/Makeconf:137: recipe for target 'parser2.o' failed
make: *** [parser2.o] Error 1
ERROR: compilation failed for package ‘roxygen2’
* removing ‘/usr/local/lib/R/site-library/roxygen2’

The downloaded source packages are in
    ‘/tmp/RtmpSn8jzt/downloaded_packages’
Warning message:
In install.packages("roxygen2", repos = "http://mirrors.dotsrc.org/cran/") :
  installation of package ‘roxygen2’ had non-zero exit status

I tried several different repos, but result is always the same. 我尝试了几种不同的存储库,但结果始终相同。 Is it a problem with version that got published in repos? 在回购中发布的版本是否存在问题? What else could I try? 我还能尝试什么?

Hadley noticed this problem with other packages and stated on a Github thread that the solution is to use the dev verstion of Rcpp , ie Hadley在其他软件包中注意到了这个问题,并在Github线程上指出解决方案是使用Rcpp的Rcpp ,即

install_github("RcppCore/Rcpp")

So, upgrade Rcpp then fully shutdown all RStudio and R processes, then restart and reinstall roxygen2 . 因此,升级Rcpp然后完全关闭所有RStudio和R进程,然后重新启动并重新安装roxygen2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM