[ncl-install] dyld: Library not loaded: /usr/local/lib/libgfortran.4.dylib

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Sun Dec 20 14:11:53 MST 2020


Tao, I should have said that it is better to install a more recent NCL
build than the precompiled binaries.  This is because you get the advantage
of improvements and bug fixes in lower level libraries that are used by NCL.

If you can easily install NCL through Conda or Macports, that would be the
preferred solution.  Installing an older GCC version is not optimal, but it
might provide a quick fix if you have trouble with these package managers.


On Sun, Dec 20, 2020 at 12:54 PM Dave Allured - NOAA Affiliate <
dave.allured at noaa.gov> wrote:

> Tao, the problem is that you need an older version of the gfortran runtime
> library.  NCL's precompiled binaries were made for gfortran 7, not gfortran
> 8.  You could try installing gfortran 7 and see if that fixes the NCL
> binary version that you have.
>
> The NCL website currently recommends the conda method for installing NCL.
> Please try that method if you need to.  You can also install NCL from
> Macports, using the port name "ncarg".  Both of these methods require some
> extra work.
>
>
> On Sun, Dec 20, 2020 at 1:11 AM Tao Zhang via ncl-install <
> ncl-install at mailman.ucar.edu> wrote:
>
>> Hi,
>>
>> I have used the second method "Installing NCL from a precompiled binary"
>> to install NCL-6.6.2 in
>>
>> my Macbook pro Majave (10.14.6).
>>
>>   When I run the ncl command, I get the error "dyld: Library not loaded:
>> /usr/local/lib/libgfortran.4.dylib". see below.
>>
>> There is no "libgfortran.4.dylib" in /usr/local/lib/, but there is
>> "libgfortran.5.dylib" in /usr/local/gfortran/lib, see below.
>>
>> I have installed successfully gfortran 8.2 and it works well in my
>> Macbook pro.
>>
>>   So I am not sure what's the problem and how to fix it?
>>
>> Thanks
>>
>>   Tao
>>
>> ------------
>>
>> /Users/tzhang/Disk> ncl
>> dyld: Library not loaded: /usr/local/lib/libgfortran.4.dylib
>>    Referenced from: /usr/local/ncl-6.6.2/bin/ncl
>>    Reason: image not found
>> Abort
>>
>> -------
>>
>> /Users/tzhang/Disk> which gcc
>> /usr/bin/gcc
>>
>> /Users/tzhang/Disk> which gfortran
>> /usr/local/bin/gfortran
>>
>> /Users/tzhang/Disk> gcc --version
>> Configured with: --prefix=/Library/Developer/CommandLineTools/usr
>> --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
>>
>>
>> Apple LLVM version 10.0.1 (clang-1001.0.46.4)
>> Target: x86_64-apple-darwin18.7.0
>> Thread model: posix
>> InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>>
>> /Users/tzhang/Disk> gfortran --version
>> GNU Fortran (GCC) 8.2.0
>> Copyright (C) 2018 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions. There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>>
>> ----------------------
>>
>> /usr/local/lib> ls
>> libh5bzip2.la*          libhdf5_hl.8.dylib* libnetcdf.la*
>> librtmp.dylib*          libz.1.dylib@
>> libh5bzip2.so*          libhdf5_hl.a libnetcdf.settings
>> libsz.2.0.0.dylib*      libz.a
>> libhdf5.8.dylib*        libhdf5_hl.dylib@ libnetcdff.7.dylib*
>> libsz.2.dylib@          libz.dylib@
>> libhdf5.a               libhdf5_hl.la* libnetcdff.a
>> libsz.a                 pkgconfig/
>> libhdf5.dylib@          libnetcdf.18.dylib* libnetcdff.dylib@
>> libsz.dylib@
>> libhdf5.la*             libnetcdf.a libnetcdff.la* libsz.la*
>> libhdf5.settings        libnetcdf.dylib@ libnetcdff.settings
>> libz.1.2.8.dylib*
>>
>> --------
>>
>> /usr/local/gfortran/lib> ls
>> gcc/                            libgcc_s_ppc64.1.dylib@
>> libitm.la*                      libssp_nonshared.a
>> libasan.5.dylib*                libgcc_s_x86_64.1.dylib@
>> libitm.spec                     libssp_nonshared.la*
>> libasan.dylib@                  libgfortran.5.dylib*
>> libobjc-gnu.4.dylib*            libstdc++.6.dylib*
>> libasan.la*                     libgfortran.a
>> libobjc-gnu.a                   libstdc++.a
>> libasan_preinit.o               libgfortran.dylib@
>> libobjc-gnu.dylib@              libstdc++.a-gdb.py
>> libatomic.1.dylib*              libgfortran.la*
>> libobjc-gnu.la*                 libstdc++.dylib@
>> libatomic.a                     libgfortran.spec
>> libquadmath.0.dylib*            libstdc++.la*
>> libatomic.dylib@                libgomp.1.dylib*
>> libquadmath.a                   libstdc++fs.a
>> libatomic.la*                   libgomp.a
>> libquadmath.dylib@              libstdc++fs.la*
>> libcc1.0.so*                    libgomp.dylib@
>> libquadmath.la*                 libsupc++.a
>> libcc1.la*                      libgomp.la*
>> libsanitizer.spec               libsupc++.la*
>> libcc1.so@                      libgomp.spec
>> libssp.0.dylib*                 libubsan.1.dylib*
>> libgcc_ext.10.4.dylib           libitm.1.dylib*
>> libssp.a                        libubsan.dylib@
>> libgcc_ext.10.5.dylib           libitm.a libssp.dylib@
>> libubsan.la*
>> libgcc_s.1.dylib                libitm.dylib@ libssp.la*
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-install/attachments/20201220/82766d72/attachment-0001.html>


More information about the ncl-install mailing list