# Cannot execute Ghostscript (gs): GMT error number = 79

**URL:** https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531
**Category:** General Usage
**Tags:** question
**Created:** [October 28, 2021, 3:07am UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531 "2021-10-28T03:07:19Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)
#### Post date: [October 28, 2021, 3:07am UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/1 "2021-10-28T03:07:19Z")

</div>

Has anyone seen this error before? It seems that my program is having trouble executing Ghostscript.

I’m on a Mac OS system.

Error message:

```julia
psconvert [ERROR]: Cannot execute Ghostscript (gs).

**ERROR:** LoadError: Something went wrong when calling the module. GMT error number = 79

Stacktrace:
[1] **error(** s::String **)**
@ Base ./error.jl:33
[2] **gmt(** ::String **)**
@ GMT ~/.julia/packages/GMT/TPV4a/src/gmt_main.jl:288
[3] **showfig(** d::Dict{Symbol, Any}, fname_ps::String, fname_ext::String, opt_T::String, K::Bool, fname::String **)**
@ GMT ~/.julia/packages/GMT/TPV4a/src/common_options.jl:3273
[4] **finish_PS_module(** ::Dict{Symbol, Any}, ::Vector{String}, ::String, ::Bool, ::Bool, ::Bool, ::Matrix{Float64}, ::Vararg{Any} **)**
@ GMT ~/.julia/packages/GMT/TPV4a/src/common_options.jl:3428
[5] **common_plot_xyz(** ::String, ::Matrix{Float64}, ::String, ::Bool, ::Bool, ::Pair{Symbol, Any}, ::Vararg{Pair{Symbol, Any}} **)**
@ GMT ~/.julia/packages/GMT/TPV4a/src/psxy.jl:215
[6] **#plot#306**
@ ~/.julia/packages/GMT/TPV4a/src/plot.jl:129 [inlined]
[7] top-level scope
@ ~/Desktop/Julia_CODAP/Plotting_GMT.jl:7

```

---

<div class="post-metadata">

### Author: ![woclass](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/woclass/32/212699_2.png) [@woclass](https://discourse.julialang.org/u/woclass)
#### Post date: [October 28, 2021, 4:30am UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/2 "2021-10-28T04:30:02Z")

</div>

> [@leon](#):
>
> `psconvert `

> Convert [E]PS file(s) to other formats using GhostScript
> 
> [psconvert — GMT 6.0.0\_r20460 documentation](http://gmt.soest.hawaii.edu/doc/latest/psconvert.html)

Maybe you need to install [Ghostscript](https://www.ghostscript.com/releases/index.html).

It is AGPL licensed software, so we cannot put it in the GMT (MIT “Expat”) package dependencies.

---

<div class="post-metadata">

### Author: ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)
#### Post date: [October 28, 2021, 10:24am UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/3 "2021-10-28T10:24:59Z")

</div>

Many thanks!

It seems that Ghostscript no longer has a Mac OS version?

> **[Ghostscript : Downloads](https://ghostscript.com/releases/gsdnld.html)**
>
> Download the latest Ghostcript releases.

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [October 28, 2021, 10:49am UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/4 "2021-10-28T10:49:00Z")

</div>

Not sure how helpful this is to know, but Ghostscript is pre-installed on macOS, and you can normally run it from the command line. Eg

```julia
ps2pdf /tmp/t.ps /tmp/t.pdf

```

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [October 28, 2021, 12:40pm UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/5 "2021-10-28T12:40:52Z")

</div>

If you don’t have it, do `brew install ghostscript` then `psconvert` automatically finds it.

---

<div class="post-metadata">

### Author: ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)
#### Post date: [October 28, 2021, 5:42pm UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/6 "2021-10-28T17:42:29Z")

</div>

Many thanks. Unfortunately, I got the below error:

```julia
MacBook-Pro Julia_CODAP % brew install ghostscript
zsh: command not found: brew

```

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [October 28, 2021, 5:48pm UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/7 "2021-10-28T17:48:01Z")

</div>

But previous you installed GMT with Homebrew, so you should have `brew`, which is _Homebrew executable_.

---

<div class="post-metadata">

### Author: ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)
#### Post date: [October 28, 2021, 6:05pm UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/8 "2021-10-28T18:05:13Z")

</div>

Thank you so much, Joa-quim! It is working now. I’m able to plot my first map finally! 😄

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [October 28, 2021, 6:10pm UTC](https://discourse.julialang.org/t/cannot-execute-ghostscript-gs-gmt-error-number-79/70531/9 "2021-10-28T18:10:53Z")

</div>

Congrats, let it be the first of many.
