# Loading setup script for JuliaCall in R not working

**URL:** <https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285>\
**Category:** General Usage\
**Tags:** juliacall\
**Created:** [December 5, 2020, 6:21am UTC](https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285 "2020-12-05T06:21:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![clement](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@clement](https://discourse.julialang.org/u/clement)\
**Post date:** [December 5, 2020, 6:21am UTC](https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285/1 "2020-12-05T06:21:18Z")

</div>

Hi everybody,

**I managed to successfully install Julia on my Ubuntu machine into a specific folder. Path to the Julia bin is**

```julia
/home/clement/Julia_download/julia-1.5.3/bin 

```

**Now, the goal is to call or run julia in R. I have installed the package “JuliaCall”. But when I run either of the following I get an error message since the julia\_setup path cannot load properly. If I run either:**

`julia_setup`  
or

```julia
julia_setup(JULIA_HOME = "/home/clement/Julia_download/julia-1.5.3/bin")

```

or

or any function like

```julia
julia_command("a = sqrt(2);"); julia_eval("a")

```

I get this error message 😞

```julia
Julia version 1.5.3 at location /home/clement/Julia_download/julia-1.5.3/bin will be used.
Loading setup script for JuliaCall...
WARNING: replacing module JuliaCall.
LoadError("/home/clement/R/x86_64-pc-linux-gnu-library/3.6/JuliaCall/julia/setup.jl", 63, ArgumentError("Package Suppressor not found in current path:\n- Run `import Pkg; Pkg.add(\"Suppressor\")` to install the Suppressor package.\n")) Error in .julia$cmd(paste0("Base.include(Main,\"", system.file("julia/setup.jl", :
 Error happens when you try to execute command Base.include(Main,"/home/clement/R/x86_64-pc-linux-gnu-library/3.6/JuliaCall/julia/setup.jl") in Julia.
                       To have more helpful error messages,
                       you could considering running the command in Julia directly
In addition: Warning message:
In system2(file.path(.julia$bin_dir, "julia"), shQuote(command), :
 running command ''/home/clement/Julia_download/julia-1.5.3/bin/julia' '--startup-file=no' '/home/clement/R/x86_64-pc-linux-gnu-library/3.6/JuliaCall/julia/install_dependency.jl' '/usr/lib/R' 2>&1' had status 1

```

**Main Question:** Is there any way I can solve this problem to be able to use or call Julia commands in R? I have already installed the package JuliaCall but the setup script for JuliaCall cannot load properly. Thus, any Julia function I call in R is basically not working.

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [December 5, 2020, 10:12am UTC](https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285/2 "2020-12-05T10:12:47Z")

</div>

It seems that somehow the needed Julia package `Suppressor` wasn’t installed.  
You may try to open your Julia REPL and add the package manually:

```julia
using Pkg; Pkg.add("Suppressor")

```

and afterwards try again with R.

---

<div class="post-metadata">

**Author:** ![clement](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@clement](https://discourse.julialang.org/u/clement)\
**Post date:** [December 5, 2020, 8:51pm UTC](https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285/3 "2020-12-05T20:51:22Z")

</div>

Thanks for the response. Unfortunately, I tried installing Julia package `Suppressor`, but it’s not working in Julia REPL. This is the error message that comes up:

```julia
ERROR: SystemError: opening file "/home/clement/.julia/registries/General/Registry.toml": No such file or directory
Stacktrace:
 [1] systemerror(::String, ::Int32; extrainfo::Nothing) at ./error.jl:168
 [2] #systemerror#48 at ./error.jl:167 [inlined]
 [3] systemerror at ./error.jl:167 [inlined]
 [4] open(::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing) at ./iostream.jl:284

```

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [December 5, 2020, 9:22pm UTC](https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285/4 "2020-12-05T21:22:32Z")

</div>

ok, something wrong. Please try

```julia
using Pkg
Pkg.instantiate()
Pkg.add("Suppressor")

```

---

<div class="post-metadata">

**Author:** ![clement](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@clement](https://discourse.julialang.org/u/clement)\
**Post date:** [December 5, 2020, 11:21pm UTC](https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285/5 "2020-12-05T23:21:12Z")

</div>

The same error popped up after running this:

```julia
using Pkg
Pkg.instantiate()
Pkg.add("Suppressor")

```

That’s the same error message, unfortunately.

```julia
ERROR: SystemError: opening file "/home/clement/.julia/registries/General/Registry.toml": No such file or directory
Stacktrace:
 [1] systemerror(::String, ::Int32; extrainfo::Nothing) at ./error.jl:168
 [2] #systemerror#48 at ./error.jl:167 [inlined]
 [3] systemerror at ./error.jl:167 [inlined]
 [4] open(::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing) at ./iostream.jl:284

```

---

<div class="post-metadata">

**Author:** ![Non-Contradiction](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-contradiction/32/2208_2.png) [@Non-Contradiction](https://discourse.julialang.org/u/Non-Contradiction)\
**Post date:** [December 6, 2020, 12:25am UTC](https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285/6 "2020-12-06T00:25:55Z")

</div>

The new error message is similar to those: [Registry.toml missing - Usage / First steps - JuliaLang](https://discourse.julialang.org/t/registry-toml-missing/24152), and [“.julia/registries/General/Registry.toml”: No such file or directory · Issue #37521 · JuliaLang/julia (github.com)](https://github.com/JuliaLang/julia/issues/37521) .  
From the information in the linked post and Github issue, deleting “/home/clement/.julia/registries/General/” may solve the problem.  
After deleting the folder, try

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

```

in julia. If everything works, then restart R and try again.

---

<div class="post-metadata">

**Author:** ![clement](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@clement](https://discourse.julialang.org/u/clement)\
**Post date:** [December 6, 2020, 12:44am UTC](https://discourse.julialang.org/t/loading-setup-script-for-juliacall-in-r-not-working/51285/7 "2020-12-06T00:44:49Z")

</div>

Thank you very much. It’s working perfectly fine now after deleting `General` within `registries`. My JuliaCall in R is working now @Non-Contradiction
