问题
CentOS7下安装rjags失败 installation of package ‘rjags’ had non-zero exit status
详细报错
> install.packages("gbs2ploidy", dependencies=TRUE) also installing the dependency ‘rjags’ trying URL 'https://cran.rstudio.com/src/contrib/rjags_4-6.tar.gz' Content type 'application/x-gzip' length 71719 bytes (70 KB) ================================================== downloaded 70 KB trying URL 'https://cran.rstudio.com/src/contrib/gbs2ploidy_1.0.tar.gz' Content type 'application/x-gzip' length 1294606 bytes (1.2 MB) ================================================== downloaded 1.2 MB * installing *source* package ‘rjags’ ... ** package ‘rjags’ successfully unpacked and MD5 sums checked checking for pkg-config... /usr/bin/pkg-config configure: WARNING: pkg-config file for jags 4 unavailable configure: WARNING: Consider adding the directory containing `jags.pc` configure: WARNING: to the PKG_CONFIG_PATH environment variable configure: Attempting legacy configuration of rjags checking for jags... no configure: error: "automatic detection of JAGS failed. Please use pkg-config to locate the JAGS library. See the INSTALL file for details." ERROR: configuration failed for package ‘rjags’ * removing ‘/gpfs_fs/home/jcbagley/R/lib64/R/library/rjags’ ERROR: dependency ‘rjags’ is not available for package ‘gbs2ploidy’ * removing ‘/gpfs_fs/home/jcbagley/R/lib64/R/library/gbs2ploidy’ The downloaded source packages are in ‘/gpfs_fs/home/jcbagley/tmp/RtmpkmTK42/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning messages: 1: In install.packages("gbs2ploidy", dependencies = TRUE) : installation of package ‘rjags’ had non-zero exit status 2: In install.packages("gbs2ploidy", dependencies = TRUE) : installation of package ‘gbs2ploidy’ had non-zero exit status
原因与解决方法
问题在于jags的pkg-config文件不可用,所以我们用conda安装后再进行尝试:
#shell下执行 conda install pkg-config jags export PKG_CONFIG_PATH="~/【conda目录】/lib/pkgconfig" #R中执行 install.packages("rjags", dependencies=TRUE)
完成
文章来源于互联网:[已解决]CentOS7下安装rjags失败 installation of package ‘rjags’ had non-zero exit status
相关推荐: WP-AutoBlog插件(v1.2.15)原版&开心版附解密,破解思路
WP-AutoBlog 插件可以采集来自于任何网站的内容并全自动更新你的WordPress站点。它使用非常简单,无需复杂设置,并且足够强大和稳定,支持wordpress所有特性。 更新日期: 2020 – 02 – 18 目前版本: v1.2.1…
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持一下吧
请登录后发表评论
注册