首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OSX上的R: ggraph安装错误

OSX上的R: ggraph安装错误
EN

Stack Overflow用户
提问于 2017-07-22 00:22:58
回答 1查看 307关注 0票数 1

我正在尝试从CRAN安装ggraph

代码语言:javascript
复制
> install.packages("ggraph")

这是输出

代码语言:javascript
复制
Installing package into ‘/usr/local/lib/R/3.4/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/ggraph_1.0.0.tar.gz'
Content type 'application/x-gzip' length 2628485 bytes (2.5 MB)
==================================================
downloaded 2.5 MB

* installing *source* package ‘ggraph’ ...
** package ‘ggraph’ successfully unpacked and MD5 sums checked
** libs
/usr/local/opt/llvm/bin/clang++ -I/usr/local/Cellar/r/3.4.1_1/R.framework/Resources/include -DNDEBUG  -I"/usr/local/lib/R/3.4/site-library/Rcpp/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC  -g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe -c RcppExports.cpp -o RcppExports.o
/usr/local/opt/llvm/bin/clang++ -I/usr/local/Cellar/r/3.4.1_1/R.framework/Resources/include -DNDEBUG  -I"/usr/local/lib/R/3.4/site-library/Rcpp/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC  -g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe -c circlePack.cpp -o circlePack.o
circlePack.cpp:447:58: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'int' in initializer list [-Wc++11-narrowing]
        Circle c = {0, 0, std::sqrt(float(*itr / M_PI)), circles.size() + 1};
                                                         ^~~~~~~~~~~~~~~~~~
circlePack.cpp:447:58: note: insert an explicit cast to silence this issue
        Circle c = {0, 0, std::sqrt(float(*itr / M_PI)), circles.size() + 1};
                                                         ^~~~~~~~~~~~~~~~~~
                                                         static_cast<int>( )
1 error generated.
make: *** [circlePack.o] Error 1
ERROR: compilation failed for package ‘ggraph’
* removing ‘/usr/local/lib/R/3.4/site-library/ggraph’
Warning in install.packages :
  installation of package ‘ggraph’ had non-zero exit status

我已经运行了brew install udunits,从源代码构建,尝试使用Github版本,等等,问题仍然存在。

如何绕过/解决此问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-07-22 00:30:25

这是代码中的错误。I submitted a fix for the bug。如果您从pull请求安装,它应该可以工作:

代码语言:javascript
复制
devtools::install_github("thomasp85/ggraph#78")
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45242456

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档