# Setting up Julia on Ubuntu?

**URL:** <https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811>\
**Category:** General Usage\
**Tags:** installation\
**Created:** [August 2, 2018, 6:37am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811 "2018-08-02T06:37:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [August 2, 2018, 6:37am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/1 "2018-08-02T06:37:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [August 2, 2018, 6:56am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/2 "2018-08-02T06:56:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [August 2, 2018, 7:00am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/3 "2018-08-02T07:00:43Z")

</div>

> [@Raf](#):
>
> 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?

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

---

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [August 2, 2018, 8:20am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/4 "2018-08-02T08:20:21Z")

</div>

Ok something weird must be happening:

```julia
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
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…

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 2, 2018, 8:54am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/5 "2018-08-02T08:54:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [August 2, 2018, 10:14am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/6 "2018-08-02T10:14:57Z")

</div>

It was ram. 1GB is not enough!

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [August 2, 2018, 11:17am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/7 "2018-08-02T11:17:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [August 2, 2018, 3:29pm UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/8 "2018-08-02T15:29:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [August 2, 2018, 8:49pm UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/9 "2018-08-02T20:49:19Z")

</div>

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

> **[Julia language for Raspberry Pi - Raspberry Pi](https://www.raspberrypi.com/news/julia-language-raspberry-pi/)**
>
> Julia language is now available for Raspberry Pi, with support for GPIO, the Sense HAT and Minecraft. Scientific computing opportunities galore!

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

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [August 2, 2018, 9:01pm UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/10 "2018-08-02T21:01:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 2, 2018, 9:52pm UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/11 "2018-08-02T21:52:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [August 3, 2018, 2:58am UTC](https://discourse.julialang.org/t/setting-up-julia-on-ubuntu/12811/12 "2018-08-03T02:58:07Z")

</div>

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.
