Non-Contradiction / JuliaCall

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

Automatic julia installation fails with "app is damanged and can't be opened" #198

Open biona001 opened 1 year ago

biona001 commented 1 year ago

On mac with M1 CPUs, I tried the following

install.packages("JuliaCall", repos='http://cran.us.r-project.org')
library(JuliaCall)
julia_setup(installJulia = TRUE)

which downloads Julia 1.9 but immediately pops a warning that the downloaded app is damaged and can't be opened:

Screenshot 2023-05-28 at 4 11 30 PM

The full error message is as follows:

$ R

R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

During startup - Warning message:
In sys.load.image(".RData", FALSE) : non-uniform 'Rounding' sampler used
> install.packages("JuliaCall", repos='http://cran.us.r-project.org')

trying URL 'http://cran.us.r-project.org/bin/macosx/big-sur-arm64/contrib/4.3/JuliaCall_0.17.5.tgz'
Content type 'application/x-gzip' length 1120841 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

The downloaded binary packages are in
    /var/folders/vr/7w477ygd2513yzklk5pzsk1r0000gn/T//RtmphDt7ZX/downloaded_packages
> 
> library(JuliaCall)
> julia_setup(installJulia = TRUE)
sh: /Users/biona001/Library/Application Support/org.R-project.R/R/JuliaCall/julia/1.9.0/Julia-1.9.app/Contents/Resources/julia/bin/julia: No such file or directory
trying URL 'https://julialang-s3.julialang.org/bin/versions.json'
Content type 'application/json' length 1032240 bytes (1008 KB)
==================================================
downloaded 1008 KB

trying URL 'https://julialang-s3.julialang.org/bin/mac/aarch64/1.9/julia-1.9.0-macaarch64.dmg'
Content type 'application/x-apple-diskimage' length 119927098 bytes (114.4 MB)
==================================================
downloaded 114.4 MB

[1] "Installed Julia to /Users/biona001/Library/Application Support/org.R-project.R/R/JuliaCall/julia/1.9.0/Julia-1.9.app/Contents/Resources/julia"
sh: /Users/biona001/Library/Application Support/org.R-project.R/R/JuliaCall/julia/1.9.0/Julia-1.9.app/Contents/Resources/julia/bin/julia: No such file or directory
Error in julia_setup(installJulia = TRUE) : 
  Julia is not found and automatic installation failed.
> 

Any tips would be appreciated.

sje30 commented 1 year ago

It could well be this problem:

https://github.com/lem-project/lem/issues/635

biona001 commented 1 year ago

The suggested solution didn't work...

@Non-Contradiction Is it true that, for now, if I want to write an R wrapper for my Julia package, I must recommend users to install Julia first?