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
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?
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.
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.
@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.
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?
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.
I donât know how Homebrew works, but I would expect that you would want to install Miniconda directly from the Anaconda site, not within Homebrew. Then Miniconda will create and manage its own set of compatible libraries. It is usually not a good idea to mix package managers. I use both Anaconda and MacPorts to install software. I install gmt6 with MacPorts and PyGMT with Anaconda and they have separate sets of libraries.