Learn How To Install JuliaLang on Ubuntu 17.04
Table of Contents
Julia, commonly known as JuliaLang, is a programming language for numerical computing. Julia is as fast as C but it does not sacrifice the readability. Therefore, we can reduce the running time of our programs as well as the development time.
Prerequisites
https://www.itweb.services/tutorials/linux-guides/setup-swap-file-on-linux”>the tutorial here to create swap.
Step 1: Install dependencies
Installing Julia requires some dependencies such as gcc
, g++
, etc. To simplify the process, log in as root
and install all the dependencies.
apt install gcc
apt install make
apt install g++
apt install python
apt install gfortran
apt install perl
apt install m4
apt install patch
apt install cmake
apt install pkg-config
Step 2: Download Julia and install
The whole process here does not require root
privilege to install Julia. Start your terminal and get the source code of Julia from Github
git clone git://github.com/JuliaLang/julia.git
All the source code will be in the folder named julia
. Switch to this folder.
cd julia
Checkout the latest version of Julia.
git checkout v0.6.0
Build Julia from source.
make -j 2
The -j
option indicates how many threads for building Julia. The more the better. It should be set equal to the number of cores of the server.
The building process is quite long.
Step 3: Verify Julia
Inside the folder julia
, we can find an executable file named julia
.
Type ./julia --version
in the command prompt and the output should look like this.
julia version 0.6.0
There are two ways to use Julia, The first one is via its REPL. Just type in ./julia
to access the REPL. The second one is by saving the running code under a file with extension .jl
and run this file with ./julia <nameOfFile.jl>
.
For convenience, you can create an alias to access julia
anywhere in your server.
Note: All the processes above have been tested with An ITWeb.Services $2.50/month VPS with Ubuntu 17.04 x64
Need help?
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!