GMT.jl error after upgrading Julia

I recently upgraded to Version 1.7.2. Is there anything I need to do to make my GMT.jl to continue to work?

Below is the error I’m having right now. Many thanks.

error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: @rpath/libgdal.29.dylib (No such file or directory)
ERROR: LoadError: failed processes:
  Process(`otool -L @rpath/libgdal.29.dylib`, ProcessExited(1)) [1]
  Process(`grep libproj`, ProcessExited(1)) [1]

  [1] pipeline_error(procs::Base.ProcessChain)
    @ Base ./process.jl:544
  [2] (::Base.var"#697#698"{Base.ProcessChain})()
    @ Base ./process.jl:320
  [3] iterate(itr::Base.EachLine{Base.PipeEndpoint}, state::Nothing) (repeats 2 times)
    @ Base ./io.jl:1019
  [4] _collect(cont::UnitRange{Int64}, itr::Base.EachLine{Base.PipeEndpoint}, #unused#::Base.HasEltype, isz::Base.SizeUnknown)
    @ Base ./array.jl:660
  [5] collect
    @ ./array.jl:649 [inlined]
  [6] #readlines#378
    @ ./io.jl:553 [inlined]
  [7] readlines(s::Base.OrCmds)
    @ Base ./io.jl:553
  [8] top-level scope
    @ ~/.julia/packages/GMT/dEogU/src/GMT.jl:62
  [9] include
    @ ./Base.jl:418 [inlined]
 [10] 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::String)
    @ Base ./loading.jl:1318
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:373 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [14] top-level scope
    @ none:1
in expression starting at /Users/leon.julia/packages/GMT/dEogU/src/GMT.jl:1
ERROR: LoadError: Failed to precompile GMT [5752ebe1-31b9-557e-87aa-f909b540aa54] to /Users/leon/.julia/compiled/v1.7/GMT/jl_iuUWKA.
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997

??? version 1.7.2 of what?

It seems a entirely a GDAL installation issue. I guess running GMT from the shell won’t work either, right?

1 Like

Many thanks for the reply.

Version 1.7.2 of Julia.

That is correct, I’m getting a bunch of errors by either typing using GMT within Julia, or using julia xxxx.jl

Is it normal to have GMT.jl corrupted by upgrading Julia? What is the fix?

Updating Julia has nothing to do with GMT.jl functioning. But you need to re-install the Julia packages after updates.
My question was. Does GMT run from the shell?

Sorry but how do I run GMT from the shell? I mainly use it through Julia.

When I type GMT in the shell, I got the below successfully:

	GMT - The Generic Mapping Tools, Version 6.2.0 [64-bit] [16 cores]
	(c) 1991-2021 The GMT Team (

	Supported in part by the US National Science Foundation (
	and volunteers from around the world.

	GMT is distributed under the GNU LGPL License (
	Dependencies: netCDF, GDAL, PCRE, FFTW, LAPACK, ZLIB, Ghostscript, GraphicsMagick, FFmpeg.

usage: gmt [options]
       gmt <module name> [<module-options>]

  --help              List descriptions of available GMT modules.
  --new-script[=L]    Write GMT modern mode script template to stdout.
                      Optionally specify bash|csh|batch [Default is current shell].
  --new-glue=name     Write C code for external supplements to glue them to GMT.
  --show-bindir       Show directory with GMT executables.
  --show-citation     Show the most recent citation for GMT.
  --show-classic      Show all classic module names.
  --show-classic-core Show all classic module names (core only).
  --show-cores        Show number of available cores.
  --show-datadir      Show directory/ies with user data.
  --show-dataserver   Show URL of the remote GMT data server.
  --show-doi          Show the DOI for the current release.
  --show-library      Show path of the shared GMT library.
  --show-modules      Show all modern module names.
  --show-modules-core Show all modern module names (core only).
  --show-plugindir    Show directory for plug-ins.
  --show-sharedir     Show directory for shared GMT resources.
  --show-userdir      Show full path of user's ~/.gmt dir
  --version           Print GMT version number.

if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise.

So that means GMT is working fine. Confess I’m lost with your GMT.jl problem. As I said when updating one must reinstall all the packages.
Try to remove GMT.jl and reinstall it again. I never had that problem.

1 Like