install.packages("rjags")Installing package into ‘/home/lfr/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/rjags_4-12.tar.gz'Content type 'application/octet-stream' length 74067 bytes (72 KB)==================================================downloaded 72 KB* installing *source* package ‘rjags’ ...** package ‘rjags’ successfully unpacked and MD5 sums checked** using staged installation
/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not found/usr/lib/R/bin/config: 1: eval: make: not foundchecking for pkg-config... no
configure: Attempting legacy configuration of rjags
checking for jags... /usr/bin/jags
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... noconfigure: error: in `/tmp/Rtmp1lFBKi/R.INSTALL21f25565bf83/rjags':configure: error: C++ compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘rjags’* removing ‘/home/lfr/R/x86_64-pc-linux-gnu-library/4.1/rjags’
Warning in install.packages :installation of package ‘rjags’ had non-zero exit status
The downloaded source packages are in ‘/tmp/RtmpKp9WTz/downloaded_packages’
首先第一个错误应该是 make没有安装,表示系统上没有make实用程序。
为了让R安装软件包,必须在Ubuntu中安装base-r-dev软件包。 r-base-dev包含许多软件包,包括一个名为build-essential的软件包,它涵盖了gcc编译器和make。
要安装 r-base-dev,请在linux终端窗口中发出以下命令,假设您已经安装了r-base。
sudo apt-get update
sudo apt-get install r-base-dev ##这个里面就涵盖了编译器和make....
后面直接安装java环境应该就可以了
install.packages("rjags")
library(rjags)
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("infercnv")
library(infercnv)
(本篇的内容就先到这里,水平有限,有错误的地方,欢迎大家批评指正!)
网友评论