Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed the pre-built Amazon Machine Image with Rstudio Server provided by bioconductor into a free micro instance on EC2.
Then I installed JAGS (Just Another Gibbs Sampler to use it via rstudio server.
To this end I simply used the Rstudio Server shell sudo apt-get install jags which worked well as far as I can tell (if I run it again, it tells me JAGS is up-to-date).

However, when I tried to install the package "rjags" which is the interface between Rstudio and JAGS via either biocLite("rjags") or install.packages("rjags"), it failed with the error message

checking for jags_version in -ljags... yes
configure: error: "JAGS module directory /usr/lib64/JAGS/modules-3 does not exist."
ERROR: configuration failed for package ‘rjags’
* removing ‘/home/ubuntu/R/library/rjags’
Warning in install.packages :
    installation of package ‘rjags’ had non-zero exit status

I checked in lib64 and, indeed, there's only the directory "jags" with "jags-terminal" as its content.

I'd be grateful for any pointers, I guess it's obvious that I've been enabled to do something beyond my understanding thanks to great tutorials.

share|improve this question

As soon as I gave up, I found the answer.

sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install r-base-dev jags r-cran-rjags

Subsequently, biocLite("rjags") works well. As the post informs me though, JAGS will exhaust a micro instance quickly anyway, so I didn't try the way in Dirk Eddelbuettel's comment anymore.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.