Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not load library "libRmath-julia" #560

Closed
fredRos opened this issue Dec 1, 2016 · 8 comments
Closed

could not load library "libRmath-julia" #560

fredRos opened this issue Dec 1, 2016 · 8 comments

Comments

@fredRos
Copy link

fredRos commented Dec 1, 2016

This seems similar to #513 where it says this has been fixed. I'm running julia 0.5 with Pkg.update() executed today

julia> Pkg.status("Distributions")
 - Distributions                 0.8.9
 - Rmath                         0.1.4
 - StatsFuns                     0.2.2
 - Distributions                 0.8.9

julia> rand(Distributions.Gamma(1.5, 60))
ERROR: error compiling rand: could not load library "libRmath-julia"
libRmath-julia.so: cannot open shared object file: No such file or directory

Any ideas? Rmath seems to be there, how come it cannot be loaded?

@simonbyrne
Copy link
Member

Can you try Pkg.build("Rmath")?

@fredRos
Copy link
Author

fredRos commented Dec 1, 2016

I did, that didn't fix it. I even followed https://github.com/JuliaStats/Rmath.jl and did

Pkg.add("Rmath")
Pkg.build("Rmath")
import Rmath: libRmath
libRmath

That worked w/o error but with Distributions, I still get same error message as above. I also restarted julia but that didn't help either

@fredRos
Copy link
Author

fredRos commented Dec 1, 2016

As a workaround, I used scipy and that worked

import PyCall
PyCall.@pyimport scipy.stats as stats
dist0 = stats.gamma(α0, scale=1/β0)
dist0[:rvs](size=1000)

@simonbyrne
Copy link
Member

Hmm for some reason you seem to be stuck using an old version of Distributions and StatsFuns.

@simonbyrne
Copy link
Member

simonbyrne commented Dec 1, 2016

What does your full Pkg.status() say?

@fredRos
Copy link
Author

fredRos commented Dec 1, 2016

julia>  Pkg.status()
19 required packages:
 - Atom                          0.5.6
 - Autoreload                    0.2.0+             master
 - ConjugatePriors               0.1.2
 - Cubature                      1.2.0
 - Distributions                 0.8.9
 - GR                            0.18.0
 - GSL                           0.3.5
 - HDF5                          0.7.0
 - IJulia                        1.3.2
 - Klara                         0.7.0
 - NLopt                         0.3.3
 - Optim                         0.6.1
 - Plots                         0.10.1+            master
 - Polynomials                   0.1.1
 - PyPlot                        2.2.4
 - ReverseDiffSource             0.3.0
 - Rmath                         0.1.4
 - StatPlots                     0.2.0
 - StatsFuns                     0.2.2
73 additional packages:
 - ASTInterpreter                0.0.4
 - AbstractTrees                 0.0.4
 - ArgParse                      0.4.0
 - ArrayViews                    0.6.4
 - AxisAlgorithms                0.1.5
 - BinDeps                       0.4.5
 - Blink                         0.4.4
 - Blosc                         0.1.7
 - COFF                          0.0.2
 - CRC                           1.2.0
 - Calculus                      0.1.15
 - CodeTools                     0.4.3
 - Codecs                        0.2.0
 - ColorTypes                    0.2.12
 - Colors                        0.6.9
 - Compat                        0.9.5
 - Conda                         0.4.0
 - DWARF                         0.1.0
 - DataArrays                    0.3.10
 - DataFrames                    0.8.5
 - ELF                           0.1.0
 - FileIO                        0.2.0
 - FixedPointNumbers             0.2.1
 - FixedSizeArrays               0.2.5
 - Formatting                    0.2.0
 - ForwardDiff                   0.2.5
 - GZip                          0.2.20
 - Gallium                       0.0.4
 - Hiccup                        0.0.3
 - HttpCommon                    0.2.6
 - HttpParser                    0.2.0
 - HttpServer                    0.1.7
 - Interpolations                0.3.6
 - Iterators                     0.2.0
 - JSON                          0.8.0
 - JuliaParser                   0.7.4
 - Juno                          0.2.5
 - KernelDensity                 0.3.0
 - LNR                           0.0.2
 - LaTeXStrings                  0.2.0
 - Lazy                          0.11.4
 - MachO                         0.0.4
 - MacroTools                    0.3.2
 - MathProgBase                  0.5.7
 - MbedTLS                       0.3.0
 - Measures                      0.0.3
 - Media                         0.2.4
 - Mustache                      0.1.2
 - Mux                           0.2.2
 - NaNMath                       0.2.2
 - Nettle                        0.2.4
 - ObjFileBase                   0.0.4
 - PDMats                        0.3.6
 - PlotThemes                    0.1.0
 - PlotUtils                     0.2.0
 - PositiveFactorizations        0.0.3
 - PyCall                        1.7.2
 - Ratios                        0.0.4
 - Reactive                      0.3.6
 - RecipesBase                   0.1.0
 - Reexport                      0.0.3
 - SHA                           0.3.0
 - Showoff                       0.0.7
 - SortingAlgorithms             0.1.0
 - StatsBase                     0.11.1
 - StructIO                      0.0.2
 - TerminalUI                    0.0.2
 - TextWrap                      0.1.6
 - URIParser                     0.1.6
 - VT100                         0.0.2
 - WebSockets                    0.2.1
 - WoodburyMatrices              0.2.0
 - ZMQ                           0.4.0

@simonbyrne
Copy link
Member

simonbyrne commented Dec 2, 2016

The problem appears to be ConjugatePriors: it has an upper bound on PDMats, which in turn constrains the version of Distributions that can be installed.

Pkg.rm("ConjugatePriors") should fix your problem.

@fredRos
Copy link
Author

fredRos commented Dec 3, 2016

Ok, thanks for analyzing this and reporting an issue in the right place!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants