Menu

Error installing rjags: "cannot link to JAGS library in /usr/local/lib."

Help
2021-07-09
2022-08-01
<< < 1 2 3 (Page 3 of 3)
  • Matt Denwood

    Matt Denwood - 2022-06-03

    You have replied to an old thread on installation on macOS, which is not really relevant to you as you say that you are running CentOS... So it would have been better to start a new thread specifically for your situation (mentioning installation on CentOS in the title of the post).

    Having said that, I can see from your output that there was some error in linking to JAGS, but I cannot see exactly what went wrong. You also don't say how you installed JAGS. It seems that https://centos.pkgs.org/7/springdale-computational-x86_64/jags4-4.3.0-67.1.x86_64.rpm.html is available but installs to /usr/lib64/JAGS/ - contra the /usr/local installation that is indicated in your pkg-config file. But then I also can't see a pkg-config file listed on the CentOS package...

    Others will be in a better position to advise on Linux than I am, but it would be helpful for you to include the following information:

    • How exactly did you install JAGS and R? From a CentOS repo? If so, which one. Compiling yourself? If so, is the compiler toolchain identical between JAGS and R?
    • What exactly is the installation path for JAGS? Specifically, what (if anything) is located under /usr/local/lib/JAGS and /usr/lib64/JAGS?

    You may get better help if you start a new thread that mentions installation on CentOS in the title. If you choose to do that, please leave one last comment here with a link to the new thread for prosperity.

     
  • honghh

    honghh - 2022-06-04

    Had anyone hear these issue? @mdenwood

     
  • Nasser Najibi

    Nasser Najibi - 2022-08-01

    I had a sort of similar problem with the dgenpareto module in R jags. Recently, I have updated my R, Rstudio, and rjags packages. Below are the platform/versions I am running my R scripts on/with:

    version _
    platform x86_64-w64-mingw32
    arch x86_64
    os mingw32
    crt ucrt
    system x86_64, mingw32
    status
    major 4
    minor 2.0
    year 2022
    month 04
    day 22
    svn rev 82229
    language R
    version.string R version 4.2.0 (2022-04-22 ucrt)
    nickname Vigorous Calisthenics

    library(runjags)
    Warning message:
    package ‘runjags’ was built under R version 4.2.1

    library(rjags)
    Loading required package: coda
    Linked to JAGS 4.3.1
    Loaded modules: basemod,bugs
    Warning message:
    package ‘rjags’ was built under R version 4.2.1

    library(R2jags)
    Attaching package: ‘R2jags’
    The following object is masked from ‘package:coda’: traceplot
    Warning message:
    package ‘R2jags’ was built under R version 4.2.1

    I am running a jags model that contains the generalized Pareto distribution (GPD) as 'dgenpareto'. I use the following command lines to run my jags model:

    jags.parallel(model.file = bayes_gpd,data = jags.data,parameters.to.save = jags.params,
    inits = jags.inits,n.iter=50000,n.chains = 4,
    jags.module='runjags')

    But I get the following Error message each time I try to evaluate my jags model:

    Error in checkForRemoteErrors(val) : 4 nodes produced errors; first error: File not found: C:\Program Files\JAGS\JAGS-4.3.1/x64/modules/runjags.dll

    While I had no issue with running my jags model (the same code) before updating the R and jags packages (~ early 2022).
    Could you please provide some hints on how I can resolve this issue? I also tried to post this question to StackOverFlow. Thanks!

     
<< < 1 2 3 (Page 3 of 3)

Log in to post a comment.