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

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:

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

Convert [E]PS file(s) to other formats using GhostScript

psconvert — GMT 6.0.0_r20460 documentation

Maybe you need to install Ghostscript.

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

1 Like

Many thanks!

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

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

ps2pdf /tmp/t.ps /tmp/t.pdf
1 Like

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

2 Likes

Many thanks. Unfortunately, I got the below error:

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

But previous you installed GMT with Homebrew, so you should have brew, which is Homebrew executable.

1 Like

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

Congrats, let it be the first of many.

1 Like