Skip to content

setupJulia() says 'RCall not properly installed' #16

@ellisztamas

Description

@ellisztamas

Dear RTIGER devs,

I am having an issue setting up rtiger on ubuntu 24 (x86_64-pc-linux-gnu) in R 4.3.3. I'm new to Julia.

Error message

Running this:

library(RTIGER)
setupJulia()

produces the following error message:

Julia version 1.0.5 at location /home/thomas.ellis/julia-1.0.5/bin will be used.
Loading setup script for JuliaCall...
WARNING: Method definition getproperty(Tuple, Int64) in module Tables at /home/thomas.ellis/.julia/packages/Tables/8p03y/src/Tables.jl:8 overwritten in module ChainRulesCore at /home/thomas.ellis/.julia/packages/ChainRulesCore/8NXnp/src/compat.jl:2.
WARNING: Method definition getproperty(Tuple, Int64) in module Tables at /home/thomas.ellis/.julia/packages/Tables/8p03y/src/Tables.jl:8 overwritten in module ChainRulesCore at /home/thomas.ellis/.julia/packages/ChainRulesCore/8NXnp/src/compat.jl:2.
ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] top-level scope at /home/thomas.ellis/.julia/packages/RCall/gOwEW/src/RCall.jl:36
 [3] include at ./boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1044
 [5] include(::Module, ::String) at ./sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:319 [inlined]
 [8] eval(::Expr) at ./client.jl:393
 [9] top-level scope at ./none:3
in expression starting at /home/thomas.ellis/.julia/packages/RCall/gOwEW/src/RCall.jl:33
LoadError("/home/thomas.ellis/R/x86_64-pc-linux-gnu-library/4.3/JuliaCall/julia/setup.jl", 80, ErrorException("Failed to precompile RCall [6f49c342-dc21-5d91-9882-a32aef131414] to /home/thomas.ellis/.julia/compiled/v1.0/RCall/8GFyb.ji.")) Error in .julia$cmd(paste0(Rhomeset, "Base.include(Main,\"", system.file("julia/setup.jl",  : 
  Error happens when you try to execute command ENV["R_HOME"] = "/usr/lib/R";Base.include(Main,"/home/thomas.ellis/R/x86_64-pc-linux-gnu-library/4.3/JuliaCall/julia/setup.jl") in Julia.
                        To have more helpful error messages,
                        you could considering running the command in Julia directly

Attempts to fix

Following the suggestion from another issue I deleted

user/.julia/registries/General/

then ran

using Pkg; Pkg.add("Suppressor"); Pkg.add("RCall"); 
using Suppressor; using RCall;

The first runs without error, but the second command returns:

[ Info: Precompiling RCall [6f49c342-dc21-5d91-9882-a32aef131414]
WARNING: Method definition getproperty(Tuple, Int64) in module Tables at /home/thomas.ellis/.julia/packages/Tables/8p03y/src/Tables.jl:8 overwritten in module ChainRulesCore at /home/thomas.ellis/.julia/packages/ChainRulesCore/8NXnp/src/compat.jl:2.
ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] top-level scope at /home/thomas.ellis/.julia/packages/RCall/gOwEW/src/RCall.jl:36
 [3] include at ./boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1044
 [5] include(::Module, ::String) at ./sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:319 [inlined]
 [8] eval(::Expr) at ./client.jl:393
 [9] top-level scope at ./none:3
in expression starting at /home/thomas.ellis/.julia/packages/RCall/gOwEW/src/RCall.jl:33
ERROR: Failed to precompile RCall [6f49c342-dc21-5d91-9882-a32aef131414] to /home/thomas.ellis/.julia/compiled/v1.0/RCall/8GFyb.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853

Running Pkg.build("RCall") returns

  Building SpecialFunctions → `~/.julia/packages/SpecialFunctions/ne2iw/deps/build.log`
  Building Rmath ───────────→ `~/.julia/packages/Rmath/BoBag/deps/build.log`
  Building Conda ───────────→ `~/.julia/packages/Conda/sNGum/deps/build.log`
  Building RCall ───────────→ `~/.julia/packages/RCall/gOwEW/deps/build.log`
┌ Error: Error building `RCall`: 
│ ERROR: LoadError: Could not find library /usr/local/lib/R/lib/libR.so. Make sure that R shared library exists.
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] validate_libR(::String) at /home/thomas.ellis/.julia/packages/RCall/gOwEW/deps/setup.jl:11
│  [3] locate_libR(::String) at /home/thomas.ellis/.julia/packages/RCall/gOwEW/deps/setup.jl:43
│  [4] top-level scope at /home/thomas.ellis/.julia/packages/RCall/gOwEW/deps/build.jl:58
│  [5] include at ./boot.jl:317 [inlined]
│  [6] include_relative(::Module, ::String) at ./loading.jl:1044
│  [7] include(::Module, ::String) at ./sysimg.jl:29
│  [8] include(::String) at ./client.jl:392
│  [9] top-level scope at none:0
│ in expression starting at /home/thomas.ellis/.julia/packages/RCall/gOwEW/deps/build.jl:11
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1096

I checked, and /usr/local/lib/R/lib/libR.so does exist.
I tried adding this to the path with the following, but this also didn't solve the problem.

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/R/lib' >> ~/.bashrc
source ~/.bashrc

At this point I am out of ideas.

Can you help?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions