# GMT.jl installation on Ubuntu 18

**URL:** https://forum.generic-mapping-tools.org/t/gmt-jl-installation-on-ubuntu-18/4647
**Category:** GMT.jl Q&A
**Created:** [January 28, 2024, 9:55am UTC](https://forum.generic-mapping-tools.org/t/gmt-jl-installation-on-ubuntu-18/4647 "2024-01-28T09:55:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aqeel-magsi](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@aqeel-magsi](https://forum.generic-mapping-tools.org/u/aqeel-magsi)
#### Post date: [January 28, 2024, 9:55am UTC](https://forum.generic-mapping-tools.org/t/gmt-jl-installation-on-ubuntu-18/4647/1 "2024-01-28T09:55:41Z")

</div>

i am trying to install GMT.jl on my Ubunto but unable to solve it. Would you suggest any solution please?

I did not find a suitable tutorial for installation:

**Below are the specifications:**

```
julia> readlines(`gmt --version`)[1]
"6.1.1"

julia> readlines(`julia --version`)[1]
"julia version 1.6.7"

```

_ **I used this command line to install GMT.jl** _

> julia\> using Pkg
> 
> julia\> Pkg.add(“GMT”)  
> Updating registry at `~/.julia/registries/General`  
> Resolving package versions…  
> Updating `~/.julia/environments/v1.6/Project.toml`  
> [5752ebe1] + GMT v0.44.8  
> Updating `~/.julia/environments/v1.6/Manifest.toml`  
> [8f4d0f93] + Conda v1.10.0  
> [5752ebe1] + GMT v0.44.8  
> [66db9d55] + SnoopPrecompile v1.0.3  
> [81def892] + VersionParsing v1.3.0

**While using Julia, I am getting this error**

> julia\> using GMT  
> [Info: Precompiling GMT [5752ebe1-31b9-557e-87aa-f909b540aa54]  
> ERROR: LoadError: LoadError: syntax: “|” is not a unary operator  
> Stacktrace:  
> [1] top-level scope  
> @ ~/.julia/packages/GMT/1kBBX/src/statplots.jl:385  
> [2] include(mod::Module, \_path::String)  
> @ Base ./Base.jl:384  
> [3] include(x::String)  
> @ GMT ~/.julia/packages/GMT/1kBBX/src/GMT.jl:1  
> [4] top-level scope  
> @ ~/.julia/packages/GMT/1kBBX/src/GMT.jl:232  
> [5] include  
> @ ./Base.jl:384 [inlined]  
> [6] include\_package\_for\_output(pkg::Base.PkgId, input::String, depot\_path::Vector{String}, dl\_load\_path::Vector{String}, load\_path::Vector{String}, concrete\_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)  
> @ Base ./loading.jl:1235  
> [7] top-level scope  
> @ none:1  
> [8] eval  
> @ ./boot.jl:360 [inlined]  
> [9] eval(x::Expr)  
> @ Base.MainInclude ./client.jl:446  
> [10] top-level scope  
> @ none:1  
> in expression starting at /home/abbas/.julia/packages/GMT/1kBBX/src/statplots.jl:385  
> in expression starting at /home/abbas/.julia/packages/GMT/1kBBX/src/GMT.jl:1  
> ERROR: Failed to precompile GMT [5752ebe1-31b9-557e-87aa-f909b540aa54] to /home/abbas/.julia/compiled/v1.6/GMT/jl\_wvcs7f.  
> Stacktrace:  
> [1] error(s::String)  
> @ Base ./error.jl:33  
> [2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::Base.TTY, internal\_stdout::Base.TTY, ignore\_loaded\_modules::Bool)  
> @ Base ./loading.jl:1385  
> [3] compilecache(pkg::Base.PkgId, path::String)  
> @ Base ./loading.jl:1329  
> [4] \_require(pkg::Base.PkgId)  
> @ Base ./loading.jl:1043  
> [5] require(uuidkey::Base.PkgId)  
> @ Base ./loading.jl:936  
> [6] require(into::Module, mod::Symbol)  
> @ Base ./loading.jl:923

---

<div class="post-metadata">

### Author: ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)
#### Post date: [January 28, 2024, 1:28pm UTC](https://forum.generic-mapping-tools.org/t/gmt-jl-installation-on-ubuntu-18/4647/2 "2024-01-28T13:28:29Z")

</div>

Hi, sorry that you has those problems and part of them I don’t understand how they can happen but thanks to your good report we’ll solve them.

Fist thing you have to do is to update your Julia version. “1.6.7” is probably the LTS version, which is very old from Julia standards and GMT.jl does not support it anymore. Like it doesn’t support GMT6.1.1 also (minimum is GMT6.4). See [juliaup](https://github.com/JuliaLang/juliaup) on to easily install the latest Julia version.

Next just do  
`] add GMT`  
and if you see that it is installing ` GMT v0.44.8` like it did for you (and it **shouldn’t** ) when it finish, without leaving the package mode (that is set by the `]` char, do `up`. That will install GMT.jl 1.10.1 and you are ready to go.

---

<div class="post-metadata">

### Author: ![aqeel-magsi](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@aqeel-magsi](https://forum.generic-mapping-tools.org/u/aqeel-magsi)
#### Post date: [January 28, 2024, 1:49pm UTC](https://forum.generic-mapping-tools.org/t/gmt-jl-installation-on-ubuntu-18/4647/3 "2024-01-28T13:49:30Z")

</div>

@Joaquim Thank you so much. After updating the Julia, the issue is solved. 🙂
