[R-sig-Debian] Can't install rjags on LinuxMint 12

Michael Rutter mar36 at psu.edu
Thu Jan 12 20:16:38 CET 2012



On 01/12/2012 01:05 PM, Jim Robison-Cox wrote:
> Hi,
>
> I'm trying to install rjags and R2jags with R version 2.14.1 (2011-12-22)
> on
> Linux Mint 12 machine using
> software repository:
> deb http://cran.fhcrc.org/bin/linux/ubuntu oneiric/
>
> jags seems to install OK, but rjags gives a weird error about not
> finding fprec symbol.
>
>
> Here is a history of the problem including several attempts to work
> around it.
> (Because of Ben Bolker's recent post, I first removed jags)
>
> sudo apt-get remove jags
> ## The following packages will be REMOVED:
> ## jags r-cran-rjags
>
> sudo apt-get install jags
> ## The following NEW packages will be installed:
> ## jags
> ## Unpacking jags (from .../jags_3.2.0-1oneiric0_amd64.deb)
>
> sudo apt-get install r-cran-rjags
> ##The following NEW packages will be installed:
> ##r-cran-rjags
> ## Unpacking r-cran-rjags (from .../r-cran-rjags_3.3-1_amd64.deb)
>
> sudo apt-get install r-cran-r2jags
> ## The following packages have unmet dependencies:
> ## r-cran-r2jags : Depends: r-cran-r2winbugs but it is not installable
> ##E: Unable to correct problems, you have held broken packages.
>
> sudo apt-get install r-cran-r2winbugs
> ## Package r-cran-r2winbugs is not available, but is referred to by
> another package.
>
> wget http://cran.fhcrc.org/src/contrib/R2WinBUGS_2.1-18.tar.gz
> sudo R CMD INSTALL R2WinBUGS_2.1-18.tar.gz
> ## * DONE (R2WinBUGS)
>
> wget http://cran.fhcrc.org/src/contrib/R2jags_0.03-02.tar.gz
> sudo R CMD INSTALL R2jags_0.03-02.tar.gz
> ##module basemod loaded
> ##Error : .onLoad failed in loadNamespace() for 'rjags', details:
> ## call: dyn.load(file)
> ## error: unable to load shared object '/usr/lib/JAGS/modules-3/bugs.so':
> ## /usr/lib/JAGS/modules-3/bugs.so: undefined symbol: fprec
>
>
>
>
> Start R with
>> sudo R
>> require(rjags)
>
> Loading required package: rjags
> linking to JAGS 3.2.0
> module basemod loaded
> Error : .onLoad failed in loadNamespace() for 'rjags', details:
> call: dyn.load(file)
> error: unable to load shared object '/usr/lib/JAGS/modules-3/bugs.so':
> /usr/lib/JAGS/modules-3/bugs.so: undefined symbol: fprec
>
>> install.packages("R2WinBUGS")
> * DONE (R2WinBUGS)
>
>> install.packages("R2jags")
> Error : .onLoad failed in loadNamespace() for 'rjags', details:
> call: dyn.load(file)
> error: unable to load shared object '/usr/lib/JAGS/modules-3/bugs.so':
> /usr/lib/JAGS/modules-3/bugs.so: undefined symbol: fprec
> Error : package ‘rjags’ could not be loaded
>
>> install.packages("R2jags")
> Installing package(s) into ‘/usr/local/lib/R/site-library’
> (as ‘lib’ is unspecified)
> trying URL 'http://cran.fhcrc.org/src/contrib/R2jags_0.03-02.tar.gz'
> Content type 'application/x-gzip' length 25915 bytes (25 Kb)
> opened URL
> ==================================================
> downloaded 25 Kb
>
> * installing *source* package ‘R2jags’ ...
> ** package ‘R2jags’ successfully unpacked and MD5 sums checked
> ** R
> ** inst
> ** preparing package for lazy loading
> module basemod loaded
> Error : .onLoad failed in loadNamespace() for 'rjags', details:
> call: dyn.load(file)
> error: unable to load shared object '/usr/lib/JAGS/modules-3/bugs.so':
> /usr/lib/JAGS/modules-3/bugs.so: undefined symbol: fprec
> Error : package ‘rjags’ could not be loaded
> ERROR: lazy loading failed for package ‘R2jags’
> * removing ‘/usr/local/lib/R/site-library/R2jags’
>
>> q()
>
>
>
> If I try installing the newer rjags3.5, I get this error:
>
>> sudo R CMD INSTALL rjags_3-5.tar.gz
> #linking to JAGS 3.2.0
> #module basemod loaded
> #Error : .onLoad failed in loadNamespace() for 'rjags', details:
> # call: dyn.load(file)
> # error: unable to load shared object '/usr/lib/JAGS/modules-3/bugs.so':
> # /usr/lib/JAGS/modules-3/bugs.so: undefined symbol: fprec
> #ERROR: installing package indices failed
> #* removing ‘/usr/local/lib/R/site-library/rjags’
>

Jim,

I do not have Linux Mint available to test, but in a clean version of 
Ubuntu 11.10, adding only the RRutter PPA 
(https://launchpad.net/~marutter/+archive/rrutter for details), I am 
able to install jags,r-cran-rjags, r-cran-r2jags, and r-cran-r2winbugs 
without any issues and they run without any issues.

I should note that due to a slight change in the numbering on CRAN, 
r-cran-rjags version 3.5 needs to be forced to be installed over the 
r-cran-jags version 3.3 that is available in the Ubuntu universe 
repositories.

Since you were unable to install r-cran-r2winbugs, I would make sure the 
RRutter repository is enabled.  Then everything should install and work 
correctly.  If it doesn't, my first guess is a difference between Mint 
and Ubuntu, but I cannot check that out right now.

Michael

-- 
Dr. Michael A. Rutter
School of Science
Penn State Erie, The Behrend College
Station Road
Erie, PA 16563
http://math.bd.psu.edu/faculty/rutter



More information about the R-SIG-Debian mailing list