GMT installation error

Hi,

I have been using GMT for a decade. Recently, I switched to Mac from Linux, and I was trying to install GMT to a new mac system via homebrew, but I was facing the following error, which I cannot resolve.

Error: gmt: Failed to download resource "proj"
Download failed: https://ghcr.io/v2/homebrew/core/proj/blobs/sha256:c2fc067271d23d5251a8448f9980e58abdcc901469d869a84800ec9047c9ff3e

Please provide some suggestions on it.

Strange. I am unaware that gmt would try to download any software. Is this the result of running brew to install GMT? Hopefully someone using brew can advice on this. I trust you followed the recipe on our website for how to install from brew?

Homebrew will download and install GMT’s dependencies and proj is just one of them.

The proj download failures is likely due to temporary network connection issue or something wrong with brew’s proj package.

I have long been installing GMT (gmt4, gmt5, and gmt6) on my Macs with MacPorts, another system similar to Homebrew. The MacPorts installation similarly downloads some other packages that are required for GMT.

It is not a good idea to use both on the same system, though. If you want to switch, you should delete homebrew before installing MacPorts.

Hi @piyushether

like @seisman writes, this seems homebrew-related.

I am using a combination of homebrew (for GMT’s netCDF and related dependencies) and William Kyngesburye’s GDAL/PROJ frameworks to build GMT from source on the Mac. Depending on your setup/hardware/OS and whether the PROJ installation issues persist, this might be an alternative route. Happy to provide help if needed.

Another way to install GMT on a mac is to use conda, a cross-platform Python package and environment manager, even if you don’t use Python. On my system, conda has the advantage of only requiring user permissions, unlike homebrew. It also keeps GMT and all its dependencies nicely organized in an isolated virtual environment.

1 Like

Yes, MacPorts also requires the system administrator privilege (sudo) to install.

I use Anaconda (the full program for “conda”) to install PyGMT that has GMT 6 as a dependency so I get GMT in that environment also.

Yes, I followed the same recipe from the GMT website for a brew.

@EJFielding, I already have a setup with Homebrew and I installed multiple other software visa Homebrew, so I don’t want to disturb them by uninstalling Homebrew and installing MacPorts. I am still looking for a solution with Homebrew.

Looks like the proj install failed due to whatever. Try to remove proj with the
brew uninstall proj
then try to install proj again.

The GMTjl docs are (re)build everytime by installing GMT with Homebrew. Last build was two ours ago. So I know it works.

I tried to install GMT via conda through Miniconda. It installed successfully, but when I tried to run any GMT command in the terminal. It shows me the following error.

dyld[95223]: Library not loaded: '@rpath/liblapack.3.dylib'
Referenced from: '/opt/homebrew/Caskroom/miniconda/base/lib/libgmt.6.dylib'
Reason: tried: '/opt/homebrew/Caskroom/miniconda/base/lib/liblapack.3.dylib' (no such file), '/opt/homebrew/Caskroom/miniconda/base/bin/../lib/liblapack.3.dylib' (no such file), '/opt/homebrew/Caskroom/miniconda/base/bin/../lib/liblapack.3.dylib' (no such file), '/usr/local/lib/liblapack.3.dylib' (no such file), '/usr/lib/liblapack.3.dylib' (no such file)

I can’t understand the error. Do I need to link this library with someone?

Hi Paul,

I tried to uninstall and reinstall ‘proj’ but it gives same error.

Error: proj: Failed to download resource "proj"
Download failed: https://ghcr.io/v2/homebrew/core/proj/blobs/sha256:c2fc067271d23d5251a8448f9980e58abdcc901469d869a84800ec9047c9ff3e

Sorry, you will need to seek help from someone using home-brew since I do not and all I know is that all others on home-brew have no problems - hence it is something specific about your setup.