Non-Contradiction / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
266 stars 36 forks source link

Issue with julia_setup on Ubuntu 22.10 #192

Open jeremiedb opened 1 year ago

jeremiedb commented 1 year ago

I'm having encoutering issues with julia_setup which I haven't been able to circumvent with the various debug tricks seen so far. More specificaly, I've been able to run julia_setup() after adding the Julia libs to R_LD_LIRABRY_PATH in .bashrc. However, when doing so, it disables the internet routines:

> library(JuliaCall)
> julia_setup()
Julia version 1.8.4 at location /home/jeremiedb/Downloads/julia-1.8.4/bin will be used.
Loading setup script for JuliaCall...
Finish loading setup script for JuliaCall.

> Sys.getenv("LD_LIBRARY_PATH")
[1] "/home/jeremiedb/Downloads/julia-1.8.4/lib/julia:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server"

> install.packages("plotly")
Installing package into ‘/home/jeremiedb/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://cloud.r-project.org/src/contrib:
  internet routines cannot be loaded

Line in .bashrc: export R_LD_LIBRARY_PATH=/home/jeremiedb/Downloads/julia-1.8.4/lib/julia

If the R_LD_LIBRARY_PATH is not exported, then the following crash occurs when using julia_setup:

> library(JuliaCall)
> julia_setup(verbose=T)
Julia version 1.8.4 at location /home/jeremiedb/Downloads/julia-1.8.4/bin will be used.
Loading setup script for JuliaCall...
Bus error (core dumped)

It seems like adding the Julia libs to LD_LIBRARY_PATH effectively works to make JuliaCall work, but messes with some other R libs (maybe curl?). I'm however getting lost as to how further investigate this.

Faraz564 commented 1 year ago

AoA Dear Jeremiedb I am facing issue with Julia. Last time I used to run my model but after updating the R-Studio I had problem. Then after encountering this trouble I did reinstall R, S-Studio and Julia but the problem remain the same in system. I see you have run the julia setup so I want to run this setup after juliacall run properly. I also going to post here screenshot of R-Studio. Please see this and gave me some suggestion. JuliaCall