Setting up Julia on Ubuntu?

installation

#1

I’m trying to put julia v0.6.4 on my Ubuntu server. But I hardly ever use Ubuntu these days.

The downloaded binary runs but wont precompile any packages, so I guess I’m missing some deps.
Does someone have a simple up-to-date gist of the process with deps that need to be installed?


#2

This sounds odd. The binaries should just work, including precompilation. Does precompilation fail for all packages or just the ones which need to build some non-Julia dependencies? If the latter, then you might be missing some *-dev ubuntu packages.


#3

There’s nothing else, no deps no nothing. Just download from https://julialang.org/downloads/ and then put a symlink if you want.


#4

Ok something weird must be happening:

julia> using OhMyREPL
INFO: Precompiling module OhMyREPL.
ERROR: Failed to precompile OhMyREPL to /home/cloud/.julia/lib/v0.6/OhMyREPL.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:497
 [3] require(::Symbol) at ./loading.jl:405

And with my own packages, the one with no deps precompiles, but the one that depends on it wont compile:

julia> using MetaFields

julia> using Flatten
INFO: Precompiling module Flatten.
ERROR: Failed to precompile Flatten to /home/cloud/.julia/lib/v0.6/Flatten.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:497
 [3] require(::Symbol) at ./loading.jl:405

I’m confused.

Edit: somehow it starts to work after x amount of Pkg.build(), using and restarts.

Edit2: but not consistenly! So I’m still confused…


#5

I would just delete the precompilation files in /home/cloud/.julia/lib/v0.6 and let Julia regenerate it.


#6

It was ram. 1GB is not enough!


#7

Is it a super old computer or a small single board computer?


#8

Its just a very small, cheap digital ocean server. Julia seems to be more resource intensive than python/php in what its minimum specs are.


#9

But Julia works on the Raspberry Pi which has less than 1Gbyte RAM

I dont have my Pi handy at the moment so I cant check if it does not precompile.


#10

There was an issue with RAM usage recently, if I remember correctly, @kristoffer.carlsson was working on that.


#11

Well, it was more like the stuff I put in made the RAM usage go up, heh.

But this was when building the sysimg, not when precompiling packages.


#12

Julia works fine, it was just some package precompiles that spiked.

I found out the droplet was actually still on the old 512MB setting they no longer offer as I hadn’t restarted it to get 1GB I was paying for! But I do love that Ubuntu just runs for 2 years without restarting…

With 2GB all the package precompiles worked.