installing JAGS and rjags as non-superuser

  • Ege

    Ege - 2010-11-24


    I really need some help installing a working JAGS and rjags in my home dir
    without superuser rights.

    I'm running Ubuntu 10.04 Lucid Lynx and R 2.11.1 at work without superuser

    I have successfully installed JAGS 2.2.0 from source into a directory called
    ~/jags/i486 by using the prefix option in ./configure

    After some trial-and-error I managed to install rjags by issuing the following
    commands in R:

    ldpath <- paste(Sys.getenv("LD_LIBRARY_PATH"), ":~/jags/i486/lib", sep="")

    (Actually I did the commands with the absolute path rather than ~).

    However when I try to load rjags I get one of the following two errors (it has
    changed after I tried different versions of JAGS and rjags):

    > library(rjags)
    Error in get(hookname, envir = env, inherits = FALSE) : 
      internal error -3 in R_decompress1
    Error: package/namespace load failed for 'rjags'
    > library(rjags)
    Error : .onLoad failed in loadNamespace() for 'rjags', details:
      call: dyn.load(file, DLLpath = DLLpath, ...)
      error: unable to load shared library '~/R/i486-pc-linux-gnu-library/2.11/rjags/libs/': cannot open shared object file: No such file or directory
    Error: package/namespace load failed for 'rjags'

    I both cases the problem is probably related to this output from the CLI:

    ~> ldd ~/R/i486-pc-linux-gnu-library/2.11/rjags/libs/ =>  (0x0073d000) => not found => /usr/lib/ (0x00308000)

    I read something about trying to use ldconfig somewhere online, but I have no
    knowledge of this tool at all and it seems to require superuser rights (all
    this would indeed be easier with the power of sudo).

    Any ideas what to do?



  • Martyn Plummer

    Martyn Plummer - 2010-11-25

    I don't think that changin LD_LIBRARY_PATH within an R session will actually
    change the behaviour of the linker. Try setting it before you launch R.

  • Ege

    Ege - 2010-12-01

    Thank you for the quick reply. I ended up being away from the office for some
    days, so haven't tested it before now. I can confirm setting LD_LIBRARY_PATH
    in the terminal works like a charm. For a reference for people searching help
    on this the command in BASH is:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"~/jags/i486/lib"

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks