I don't know why I seem to be having such trouble with this (if I did, I
wouldn't bother you about it, I suppose!), but I can't get rjags to detect my
JAGS installation properly.
I'm running Ubuntu 11.10 and have admin status. I installed JAGS 3.2.0 from
source, using the standard directory structure (i.e., prefix=/usr/local). My
JAGS installation works perfectly fine when I run standalone JAGS scripts.
Which is why I'm confused that I can't seem to get rjags to install correctly.
I've tried passing various directory arguments via configure.args, but to no
avail. I invariably get the following output when trying to install rjags:
> install.packages('rjags')
Installing package(s) into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL '[url]http://streaming.stat.iastate.edu/CRAN/src/contrib/rjags_3-5.tar.gz[/url]'
Content type 'application/x-gzip' length 66429 bytes (64 Kb)
opened URL
==================================================
downloaded 64 Kb
* installing *source* package ‘rjags’ ...
checking for prefix by checking for jags... /usr/local/bin/jags
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Console.h usability... yes
checking Console.h presence... yes
checking for Console.h... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for jags_version in -ljags... yes
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/unix/zzz.R
** libs
g++ -I/usr/share/R/include -I/usr/local/include/JAGS -fpic -O3 -pipe -g -c jags.cc -o jags.o
g++ -I/usr/share/R/include -I/usr/local/include/JAGS -fpic -O3 -pipe -g -c parallel.cc -o parallel.o
g++ -shared -o rjags.so jags.o parallel.o -L/usr/local/lib -ljags -L/usr/lib64/R/lib -lR
installing to /usr/local/lib/R/site-library/rjags/libs
** R
** data
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
Error : .onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/local/lib/R/site-library/rjags/libs/rjags.so':
libjags.so.3: cannot open shared object file: No such file or directory
ERROR: installing package indices failed
* removing ‘/usr/local/lib/R/site-library/rjags’
The downloaded packages are in
‘/tmp/RtmpmVdfiI/downloaded_packages’
Warning message:
In install.packages("rjags") :
installation of package 'rjags' had non-zero exit status
"/usr/local/lib" contains the libjags and libjrmath libraries, the modules are
in "/usr/local/lib/JAGS/modules-3", headers are in "/usr/local/include/JAGS"
and the binary is in "usr/local/bin". However, running
produces exactly the same results as above. I just can't seem to be able to
get rjags to find libjags.so.3 (despite the fact that it is clearly in
/usr/local/lib).
I'm afraid I have no clue why the rjags installation should fail. Given the
simplicity of the task, I feel like I am missing something incredibly obvious.
In any case, I would appreciate any assistance.
Many thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having the same problem that you had. It seems rjags just cannot find
libjags.so.3, even though it is clearly in /usr/local/lib. But adding dep=TRUE
doesn't seem to solve my problem. And I am having a hard time understanding
why it would. The only dependency is coda package, which I have installed. Am
I also missing something obvious here? Many thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) The directory /usr/local/lib is not on the default linker path. Try
"/sbin/ldconfig -p | grep jags". If you don't see anything then you need to
add /usr/local/lib to your linker path by editing /etc/ld.co.conf and then run
/sbin/ldconfig as root to update it.
2) You are working with 64-bit R and JAGS but have installed JAGS in the wrong
place. If R is in /usr/lib64/R then rjags expects to find JAGS in
/usr/local/lib64 not /usr/local/lib.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I kind of have a similar problem, but can't figure out how to make it work.
I have used a non-standard location, since I don't have write permission in standard directories.
the installation of JAGS is in "/perm/hechtmay/JAGS/JAGS-3.3.0"
the 64bit library is in "/perm/hechtmay/JAGS/JAGS-3.3.0/lib64"
Add the option --enable-rpath to configure.args. This will hard code the location of the JAGS library into rjags so that rjags can find it, even though it is in a non-standard location.
I am new to linux. I am trying to install rjags on R, but it keeps giving me this error. i don't know what's wrong. I am working on ubuntu 12.04 LTS with Intel® Core™2 Duo CPU P7450 @ 2.13GHz × 2. OS is 32-bit.
install.packages("rjags",dep = TRUE)
Installing package into ‘/home/xiaodoudou/R/i686-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://cran.revolutionanalytics.com/src/contrib/rjags_3-10.tar.gz'
Content type 'application/x-gzip' length 67359 bytes (65 Kb)
opened URL
==================================================
downloaded 65 Kb
installing source package ‘rjags’ ... package ‘rjags’ successfully unpacked and MD5 sums checked
checking for prefix by checking for jags... /usr/local/bin/jags
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Console.h usability... yes
checking Console.h presence... yes
checking for Console.h... yes
checking for gcc... gcc -std=gnu99
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for jags_version in -ljags... yes
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/unix/zzz.R libs
g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include/JAGS -fpic -O3 -pipe -g -c jags.cc -o jags.o
g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include/JAGS -fpic -O3 -pipe -g -c parallel.cc -o parallel.o
g++ -shared -o rjags.so jags.o parallel.o -L/usr/local/lib -ljags -L/usr/lib/R/lib -lR
installing to /home/xiaodoudou/R/i686-pc-linux-gnu-library/3.0/rjags/libs R data preparing package for lazy loading help * installing help indices building package indices
Warning: namespace ‘rjags’ is not available and has been replaced
by .GlobalEnv when processing object ‘LINE’
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/xiaodoudou/R/i686-pc-linux-gnu-library/3.0/rjags/libs/rjags.so':
libjags.so.3: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
The downloaded source packages are in
‘/tmp/RtmpSmpHbV/downloaded_packages’
Warning message:
In install.packages("rjags", dep = TRUE) :
installation of package ‘rjags’ had non-zero exit status
I tried the methods listed above. But neither of those worked.
Thank you very much.
Huaiying
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You really only need the first one, but the second one has a 1000 more
packages for R that may be useful. Once you have insalled those two
PPAs as per the instructions on those pagesm do the following:
rjags will be installed, as well as JAGS if needed and anything else.
You should be good to go. The only hang-up would be if you need to have
JAGS installed in a strange location or you don't have sudo rights. Let
me know if that is the case.
Hope this helps,
Michael
On 08/01/2013 12:57 PM, Huaiying Lin wrote:
Hi,
I am new to linux. I am trying to install rjags on R, but it keeps
giving me this error. i don't know what's wrong. I am working on ubuntu
12.04 LTS with Intel® Core™2 Duo CPU P7450 @ 2.13GHz × 2. OS is 32-bit.
install.packages("rjags",dependencies=TRUE)
install.packages("rjags",dep = TRUE)
Installing package into
‘/home/xiaodoudou/R/i686-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL
'http://cran.revolutionanalytics.com/src/contrib/rjags_3-10.tar.gz'
Content type 'application/x-gzip' length 67359 bytes (65 Kb)
opened URL
==================================================
downloaded 65 Kb
installing /source/ package ‘rjags’ ... package ‘rjags’ successfully unpacked and MD5 sums checked
checking for prefix by checking for jags... /usr/local/bin/jags
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Console.h usability... yes
checking Console.h presence... yes
checking for Console.h... yes
checking for gcc... gcc -std=gnu99
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for jags_version in -ljags... yes
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/unix/zzz.R libs
g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include/JAGS -fpic
-O3 -pipe -g -c jags.cc -o jags.o
g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include/JAGS -fpic
-O3 -pipe -g -c parallel.cc -o parallel.o
g++ -shared -o rjags.so jags.o parallel.o -L/usr/local/lib -ljags
-L/usr/lib/R/lib -lR
installing to
/home/xiaodoudou/R/i686-pc-linux-gnu-library/3.0/rjags/libs
*R
data
*preparing package for lazy loading
help
** installing help indices
building package indices
Warning: namespace ‘rjags’ is not available and has been replaced
by .GlobalEnv when processing object ‘LINE’
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/home/xiaodoudou/R/i686-pc-linux-gnu-library/3.0/rjags/libs/rjags.so':
libjags.so.3: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
The downloaded source packages are in
‘/tmp/RtmpSmpHbV/downloaded_packages’
Warning message:
In install.packages("rjags", dep = TRUE) :
installation of package ‘rjags’ had non-zero exit status
I tried the methods listed above. But neither of those worked.
Thank you very much.
I'm trying again (see my post from 2013 above) to install rjags, this time with R version 3.2.3 and JAGS version 4.1.0 .
I still don't have any root privileges, the operating system is CentOS release 5.6 .
I configured JAGS this way:
./configure --prefix=/perm/hechtmay/JAGS/JAGS-4.1.0 --libdir=/perm/hechtmay/JAGS/JAGS-4.1.0/lib64
make
make install
The directory looks like this:
/perm/hechtmay/JAGS/JAGS-4.1.0]
drwx------ 2 hechtmay eins 3864 Feb 9 21:51 bin
drwx------ 3 hechtmay eins 3864 Feb 9 21:51 include
drwx------ 4 hechtmay eins 3864 Feb 9 21:51 lib64
drwx------ 2 hechtmay eins 3864 Feb 9 21:51 libexec
drwx------ 3 hechtmay eins 3864 Feb 9 21:51 share
Now I am trying to install rjags with just the --with-jags-prefix option:
The error is:
configure: error: rjags requires JAGS version 4.x.y
This is the entire output:
hechtmay @ clou1.local [ /perm/hechtmay/JAGS/JAGS-4.1.0 ][230]% /perm/hechtmay/R/R-3.2.3/bin/R CMD INSTALL --configure-args=--with-jags-prefix=/perm/hechtmay/JAGS/JAGS-4.1.0 /work/hechtmay/R/install_R_package/targz/rjags_4-4.tar.gz installing to library ‘/perm/hechtmay/R/R-3.2.3/library’ 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 whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Console.h usability... yes
checking Console.h presence... yes
checking for Console.h... yes
configure: Compile flags are -I/perm/hechtmay/JAGS/JAGS-4.1.0/include/JAGS
configure: Link flags are -L/perm/hechtmay/JAGS/JAGS-4.1.0/lib64 -ljags
checking for gcc... gcc -std=gnu99
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for jags_version in -ljags... yes
checking version of JAGS library... wrong version
configure: error: rjags requires JAGS version 4.x.y
ERROR: configuration failed for package ‘rjags’ removing ‘/perm/hechtmay/R/R-3.2.3/library/rjags’
Any help is very much appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been struggling to get rjags installed on my mac (OS 10.10) for the past few days. I installed JAGS via macports and via the dmg file on the source forge page, but still get the same error whenever I try to install rjags via install.packages() or via devtools::install_url(). Below is the output from install.packages("rjags", dependencies = T) on my machine.
*** installing help indices
** building package indices
Warning: namespace ‘rjags’ is not available and has been replaced
by .GlobalEnv when processing object ‘LINE’
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rjags/libs/rjags.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN4jags11SimpleRangeC1ERKSt6vectorIiSaIiEES5_
Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rjags/libs/rjags.so
Expected in: flat namespace
in /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rjags/libs/rjags.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rjags’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rjags’
The downloaded source packages are in
‘/private/var/folders/d_/gyqsqcq13m7_kcpx9hxdxx540000gn/T/RtmpwRQcfO/downloaded_packages’
Warning message:
In install.packages("rjags") :
installation of package ‘rjags’ had non-zero exit status
~~~~
~~~~
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.2.3 tcltk_3.2.3
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I don't know why I seem to be having such trouble with this (if I did, I
wouldn't bother you about it, I suppose!), but I can't get rjags to detect my
JAGS installation properly.
I'm running Ubuntu 11.10 and have admin status. I installed JAGS 3.2.0 from
source, using the standard directory structure (i.e., prefix=/usr/local). My
JAGS installation works perfectly fine when I run standalone JAGS scripts.
Which is why I'm confused that I can't seem to get rjags to install correctly.
I've tried passing various directory arguments via configure.args, but to no
avail. I invariably get the following output when trying to install rjags:
"/usr/local/lib" contains the libjags and libjrmath libraries, the modules are
in "/usr/local/lib/JAGS/modules-3", headers are in "/usr/local/include/JAGS"
and the binary is in "usr/local/bin". However, running
produces exactly the same results as above. I just can't seem to be able to
get rjags to find libjags.so.3 (despite the fact that it is clearly in
/usr/local/lib).
I'm afraid I have no clue why the rjags installation should fail. Given the
simplicity of the task, I feel like I am missing something incredibly obvious.
In any case, I would appreciate any assistance.
Many thanks!
Maybe this is not the correct path, but have you tried to force R to install
dependencies with "install.packages("rjags", dependencies=TRUE)"?
Well, at least I can take solace in the fact that I was right in saying that I
was missing something obvious. That did the trick--many thanks, xevi!
Hi plasmoidal,
I am having the same problem that you had. It seems rjags just cannot find
libjags.so.3, even though it is clearly in /usr/local/lib. But adding dep=TRUE
doesn't seem to solve my problem. And I am having a hard time understanding
why it would. The only dependency is coda package, which I have installed. Am
I also missing something obvious here? Many thanks!
Two possibilities spring to mind:
1) The directory /usr/local/lib is not on the default linker path. Try
"/sbin/ldconfig -p | grep jags". If you don't see anything then you need to
add /usr/local/lib to your linker path by editing /etc/ld.co.conf and then run
/sbin/ldconfig as root to update it.
2) You are working with 64-bit R and JAGS but have installed JAGS in the wrong
place. If R is in /usr/lib64/R then rjags expects to find JAGS in
/usr/local/lib64 not /usr/local/lib.
Martyn,
Thank you very much! It is the first situation. I am playing with Arch Linux
and it doesn't include /usr/local/lib in the default linker path.
Wei
Hi,
I kind of have a similar problem, but can't figure out how to make it work.
I have used a non-standard location, since I don't have write permission in standard directories.
the installation of JAGS is in "/perm/hechtmay/JAGS/JAGS-3.3.0"
the 64bit library is in "/perm/hechtmay/JAGS/JAGS-3.3.0/lib64"
The operation system ist "RedHat EL 5"
when I try to install 'rjags' package
this error occurs:
both suggestions won't work
[1] if I run "/sbin/ldconfig -p | grep jags", it's blank
but i cannot run /sbin/ldconfig
[2] i don't have write permission in /usr/local/lib64
what can I do to make it work?
Add the option
--enable-rpath
toconfigure.args
. This will hard code the location of the JAGS library into rjags so that rjags can find it, even though it is in a non-standard location.I have made some changes to rjags_4 (not yet released) that should make it easier to negotiate the problems with non-standard installations.
Thanks a lot for the very quick response!!
Now it works.
Hi,
I am new to linux. I am trying to install rjags on R, but it keeps giving me this error. i don't know what's wrong. I am working on ubuntu 12.04 LTS with Intel® Core™2 Duo CPU P7450 @ 2.13GHz × 2. OS is 32-bit.
I followed the steps below,
http://www.tonicebrian.com/2011/09/13/getting-started-with-jags-for-bayesian-modelling/
but I am stuck at the
package ‘rjags’ successfully unpacked and MD5 sums checked
checking for prefix by checking for jags... /usr/local/bin/jags
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Console.h usability... yes
checking Console.h presence... yes
checking for Console.h... yes
checking for gcc... gcc -std=gnu99
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for jags_version in -ljags... yes
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/unix/zzz.R libs
g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include/JAGS -fpic -O3 -pipe -g -c jags.cc -o jags.o
g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include/JAGS -fpic -O3 -pipe -g -c parallel.cc -o parallel.o
g++ -shared -o rjags.so jags.o parallel.o -L/usr/local/lib -ljags -L/usr/lib/R/lib -lR
installing to /home/xiaodoudou/R/i686-pc-linux-gnu-library/3.0/rjags/libs
R
data
preparing package for lazy loading
help
* installing help indices
building package indices
Warning: namespace ‘rjags’ is not available and has been replaced
by .GlobalEnv when processing object ‘LINE’
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/xiaodoudou/R/i686-pc-linux-gnu-library/3.0/rjags/libs/rjags.so':
libjags.so.3: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
The downloaded source packages are in
‘/tmp/RtmpSmpHbV/downloaded_packages’
Warning message:
In install.packages("rjags", dep = TRUE) :
installation of package ‘rjags’ had non-zero exit status
I tried the methods listed above. But neither of those worked.
Thank you very much.
Huaiying
Huaiying,
Don't worry about installing JAGS and rjags from source on Ubuntu. Go
to these two Launchpad PPAs:
https://launchpad.net/~marutter/+archive/rrutter
https://launchpad.net/~marutter/+archive/c2d4u
You really only need the first one, but the second one has a 1000 more
packages for R that may be useful. Once you have insalled those two
PPAs as per the instructions on those pagesm do the following:
sudo apt-get update
sudo apt-get install r-cran-rjags
rjags will be installed, as well as JAGS if needed and anything else.
You should be good to go. The only hang-up would be if you need to have
JAGS installed in a strange location or you don't have sudo rights. Let
me know if that is the case.
Hope this helps,
Michael
On 08/01/2013 12:57 PM, Huaiying Lin wrote:
Hi Michael,
It did the trick!! Yeah!! Thank you so much!!
Huaiying
Hi,
I'm trying again (see my post from 2013 above) to install rjags, this time with R version 3.2.3 and JAGS version 4.1.0 .
I still don't have any root privileges, the operating system is CentOS release 5.6 .
I configured JAGS this way:
The directory looks like this:
/perm/hechtmay/JAGS/JAGS-4.1.0]
drwx------ 2 hechtmay eins 3864 Feb 9 21:51 bin
drwx------ 3 hechtmay eins 3864 Feb 9 21:51 include
drwx------ 4 hechtmay eins 3864 Feb 9 21:51 lib64
drwx------ 2 hechtmay eins 3864 Feb 9 21:51 libexec
drwx------ 3 hechtmay eins 3864 Feb 9 21:51 share
Now I am trying to install rjags with just the --with-jags-prefix option:
The error is:
configure: error: rjags requires JAGS version 4.x.y
This is the entire output:
hechtmay @ clou1.local [ /perm/hechtmay/JAGS/JAGS-4.1.0 ] [230]% /perm/hechtmay/R/R-3.2.3/bin/R CMD INSTALL --configure-args=--with-jags-prefix=/perm/hechtmay/JAGS/JAGS-4.1.0 /work/hechtmay/R/install_R_package/targz/rjags_4-4.tar.gz
installing to library ‘/perm/hechtmay/R/R-3.2.3/library’
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 whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Console.h usability... yes
checking Console.h presence... yes
checking for Console.h... yes
configure: Compile flags are -I/perm/hechtmay/JAGS/JAGS-4.1.0/include/JAGS
configure: Link flags are -L/perm/hechtmay/JAGS/JAGS-4.1.0/lib64 -ljags
checking for gcc... gcc -std=gnu99
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for jags_version in -ljags... yes
checking version of JAGS library... wrong version
configure: error: rjags requires JAGS version 4.x.y
ERROR: configuration failed for package ‘rjags’ removing ‘/perm/hechtmay/R/R-3.2.3/library/rjags’
Any help is very much appreciated.
The latest version of the rjags package is
rjags_4-5
. Please use that version.Configuration of rjags has changed since 2013. The preferred method is now to use pkg-config.
The INSTALL file that comes with the rjags tarball has details.
Thank you so much for your super fast response! It works :-)
Just another note for me (for future - hopefully less time-consuming - attempts):
use setenv instead of export (since export is not available)
I've been struggling to get rjags installed on my mac (OS 10.10) for the past few days. I installed JAGS via macports and via the dmg file on the source forge page, but still get the same error whenever I try to install rjags via install.packages() or via devtools::install_url(). Below is the output from install.packages("rjags", dependencies = T) on my machine.