Plots build & precompilation error on Linux aarch64

I was trying to use the Plots.jl package on an Nvidia Jetson running Linux aarch64. Unfortunately I am not able to go past building and precompiling the package.

During the build I get the following error:

(@v1.4) pkg> build Plots
   Building GR ───→ `~/.julia/packages/GR/8mv9N/deps/build.log`
┌ Error: Error building `GR`:
│ tar (child): downloads/gr-0.51.0-Linux-aarch64.tar.gz: Cannot open: No such file or directory
│ tar (child): Error is not recoverable: exiting now
│ tar: Child returned status 2
│ tar: Error is not recoverable: exiting now
│ [ Info: Downloading pre-compiled GR 0.51.0 Linux binary
│ ┌ Error: Download failed: curl: (22) The requested URL returned error: 404 Not Found
│ └ @ Base download.jl:43
│ ┌ Error: Download failed: curl: (22) The requested URL returned error: 404
│ └ @ Base download.jl:43
│ [ Info: Using insecure connection
│ ┌ Error: Download failed: curl: (22) The requested URL returned error: 404 Not Found
│ └ @ Base download.jl:43
│ [ Info: Cannot download GR run-time
│ ERROR: LoadError: failed process: Process(`tar xzf downloads/gr-0.51.0-Linux-aarch64.tar.gz`, ProcessExited(2)) [2]
│
│ Stacktrace:
│  [1] pipeline_error at ./process.jl:525 [inlined]
│  [2] run(::Cmd; wait::Bool) at ./process.jl:440
│  [3] run(::Cmd) at ./process.jl:438
│  [4] top-level scope at /home/coz/.julia/packages/GR/8mv9N/deps/build.jl:134
│  [5] include(::String) at ./client.jl:439
│  [6] top-level scope at none:5
│ in expression starting at /home/coz/.julia/packages/GR/8mv9N/deps/build.jl:74
└ @ Pkg.Operations /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:892
   Building Plots → `~/.julia/packages/Plots/VA7Vx/deps/build.log`

And during precompilation:

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
Cannot open cache file "/home/coz/.julia/compiled/v1.4/NaNMath/k9Y1O_LPpax.ji.dJaSDx" for writing.
ERROR: LoadError: Failed to precompile NaNMath [77ba4419-2d1f-58cd-9bb1-8ffee604a2e3] to /home/coz/.julia/compiled/v1.4/NaNMath/k9Y1O_LPpax.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922
 [6] include(::Module, ::String) at ./Base.jl:377
 [7] top-level scope at none:2
 [8] eval at ./boot.jl:331 [inlined]
 [9] eval(::Expr) at ./client.jl:449
 [10] top-level scope at ./none:3
in expression starting at /home/coz/.julia/packages/Plots/VA7Vx/src/Plots.jl:135
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /home/coz/.julia/compiled/v1.4/Plots/ld3vC_LPpax.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922
 [6] eval(::Module, ::Any) at ./boot.jl:331
 [7] eval_user_input(::Any, ::REPL.REPLBackend) at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
 [8] run_backend(::REPL.REPLBackend) at /home/coz/.julia/packages/Revise/BqeJF/src/Revise.jl:1184
 [9] top-level scope at none:0
 [10] eval(::Module, ::Any) at ./boot.jl:331
 [11] eval_user_input(::Any, ::REPL.REPLBackend) at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
 [12] run_backend(::REPL.REPLBackend) at /home/coz/.julia/packages/Revise/BqeJF/src/Revise.jl:1184
 [13] top-level scope at none:0

My internet connection works, so the curl URL error is a bit strange. Things I have tried so far that did not fix the issue:

  • rm -r .julia/compiled/v1.4/NaNMath
  • sudo chmod 777 .julia/compiled/v1.4/NaNMath