首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未安装JAGS的自制软件

未安装JAGS的自制软件
EN

Stack Overflow用户
提问于 2020-08-28 03:16:24
回答 1查看 198关注 0票数 0

我正在尝试通过homebrew安装JAGS,这样我就可以在R中使用它了。我每次安装时都会收到以下警告:

代码语言:javascript
复制
Warning: jags dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.

然后,当我尝试在R中安装rjags时,我得到以下错误:

代码语言:javascript
复制
configure: error: "cannot link to JAGS library in /usr/local/Cellar/jags/4.3.0_2/lib."
ERROR: configuration failed for package ‘rjags’
* removing ‘/usr/local/lib/R/4.0/site-library/rjags’

我还尝试了遵循JAGS 4.3.0自述文件中的安装指南。一旦我搬到R,这就产生了同样的错误。

谷歌搜索将我带到以下链接,这些链接似乎都没有密切相关到足以帮助我:

https://github.com/Homebrew/brew/issues/4904 https://github.com/Homebrew/homebrew-core/issues/32112 Link different C++ standard libraries on Mac OS X

这也是我的brew doctor的全部结果

代码语言:javascript
复制
(base) aridf@Aris-MacBook-Pro ~ % brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /Users/aridf/opt/anaconda3/bin/icu-config
  /Users/aridf/opt/anaconda3/bin/krb5-config
  /Users/aridf/opt/anaconda3/bin/freetype-config
  /Users/aridf/opt/anaconda3/bin/xslt-config
  /Users/aridf/opt/anaconda3/bin/libpng16-config
  /Users/aridf/opt/anaconda3/bin/libpng-config
  /Users/aridf/opt/anaconda3/bin/xml2-config
  /Users/aridf/opt/anaconda3/bin/python3-config
  /Users/aridf/opt/anaconda3/bin/curl-config
  /Users/aridf/opt/anaconda3/bin/ncursesw6-config
  /Users/aridf/opt/anaconda3/bin/pcre-config
  /Users/aridf/opt/anaconda3/bin/python3.8-config

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libtcl8.6.dylib
  /usr/local/lib/libtk8.6.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/fakemysql.h
  /usr/local/include/fakepq.h
  /usr/local/include/fakesql.h
  /usr/local/include/itcl.h
  /usr/local/include/itcl2TclOO.h
  /usr/local/include/itclDecls.h
  /usr/local/include/itclInt.h
  /usr/local/include/itclIntDecls.h
  /usr/local/include/itclMigrate2TclCore.h
  /usr/local/include/itclTclIntStubsFcn.h
  /usr/local/include/mysqlStubs.h
  /usr/local/include/odbcStubs.h
  /usr/local/include/pqStubs.h
  /usr/local/include/tcl.h
  /usr/local/include/tclDecls.h
  /usr/local/include/tclOO.h
  /usr/local/include/tclOODecls.h
  /usr/local/include/tclPlatDecls.h
  /usr/local/include/tclThread.h
  /usr/local/include/tclTomMath.h
  /usr/local/include/tclTomMathDecls.h
  /usr/local/include/tdbc.h
  /usr/local/include/tdbcDecls.h
  /usr/local/include/tdbcInt.h
  /usr/local/include/tk.h
  /usr/local/include/tkDecls.h
  /usr/local/include/tkPlatDecls.h

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
  /usr/local/lib/pkgconfig/tcl.pc
  /usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libtclstub8.6.a
  /usr/local/lib/libtkstub8.6.a

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2020-08-28 03:49:45

根据https://gist.github.com/casallas/8411082,解决方案是将~/.R/Makedir更改为:

代码语言:javascript
复制
CC=clang
CXX=clang++

然后在R中重新安装软件包

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63622826

复制
相关文章

相似问题

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