Running NCL under Linux systemsThis document contains helpful notes on choosing the correct NCL precompiled binary for your LINUX machine, and for running NCL on Linux systems:
- Choosing the right NCL binary for your Linux system
- Dealing with missing libgfortran issue
- Dealing with missing libxxx.so files
- Installing other software for Linux
- Full list of available binaries
Choosing the right NCL binary for your Linux systemIf you are installing pre-compiled NCL binaries on a Linux system, there are a number of binaries to choose from.
The binary filenames contain the type of Linux it was built on (RedHat/RHEL, Debian, CentOS, SuSE Linux), the "bitness" (32-bit or 64-bit), and which version of the GNU or Intel compilers it was compiled with. The binary filenames look like this:
The above binary was compiled on a 64-bit RedHat release 6.4 system using GNU compilers version 4.7.2.
If you are not sure which Linux binary to download, we recommend trying either the "ncl_ncarg-6.4.0-CentOS6.8_64bit_gnu447.tar.gz" or "ncl_ncarg-6.4.0-RHEL6.4_64bit_gnu447.tar.gz" binary if you need OPeNDAP, or "ncl_ncarg-6.4.0-CentOS6.8_64bit_nodap_gnu447.tar.gz" or "ncl_ncarg-6.4.0-RHEL6.4_64bit_nodap_gnu447.tar.gz" if you don't.
If you want to download a Linux binary that is close to the kind of system you have, then type the following on your Linux system to get the type of system you have (32-bit or 64-bit), the flavor of LINUX you are running (RedHat/RHEL, Debian, CentOS, etc), and the version of gcc and gfortran:
uname -m cat /etc/issue gcc --versionFor example, if the above commands report "x86_64", "Debian 8", and "4.7.2", then you should download one of these binaries:
You must match the bitness (32-bit or 64-bit). You can't use an "x86_64" binary on a system whose "uname -m" reports "i686". Secondly it's important to try to match your flavor of Linux if possible, and then match your version of gcc as close as possible.
If your flavor of Linux or "bitness" doesn't match, then you can usually use one of the other ones. For example, if you have a CentOS or Fedora system, then try a RedHat binary. If you have a Ubuntu system, try a Debian binary.
Dealing with missing libgfortran issueFor most Linux binaries, NCL was built using gcc and gfortran. This may cause a dependency on a file called "libgfortran.so.x".
If you have a different version of gfortran installed on your system than what NCL was built with, then you may get an error message that "libgfortran.so.x can't be found".
If you see this, then you can try one of these things:
- Trying googling part of the error message that you're getting,
along the flavor of LINUX.c for example, "CentOS cannot open
libgfortran.so.1". You will usually get several hits with lots of
- Install the version of gfortran that your version of NCL was built
with. (It is possible to have multiple versions of gfortran installed
on the same system without conflict.)
- Try to find the libgfortran.so.x file that it is
complaining about. You can try the "locate" command.
For example if the file is "libgfortran.so.1":
If found, you can add this path to your LD_LIBRARY_PATH environment variable. Important note: it is generally recommended that you do not directly set LD_LIBRARY_PATH. If you have to do this, it may mean that gfortran may not be installed correctly on your system, and setting LD_LIBRARY_PATH is just a kludgy work-around. However, if you just can't get it to work, then read on.
For example, if "libgfortran.so.1" is the file you need, and it is in /usr/local/lib, then look at the instructions below, depending on what shell you are running, and depending on whether LD_LIBRARY_PATH is already set:
env | grep LD_LIBRARY_PATHFrom csh or tcsh, if not set:
setenv LD_LIBRARY_PATH /usr/local/libFrom csh or tcsh, if already set:
setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/libFrom bash or ksh, if not set:
export LD_LIBRARY_PATH=/usr/local/libFrom bash or ksh, if already set:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/libFrom sh, if not set:
LD_LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATHFrom sh, if already set:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib export LD_LIBRARY_PATH
- If all else fails, then send email to firstname.lastname@example.org. You need to be a member in order to post.
Dealing with missing libxxx.so files
Some of the NCL binaries are OPeNDAP-enabled, which means there are a number of dependencies on shared libraries. If you try to run "ncl" and get one or more errors about not finding "libxxx.so" files, then you can try a few things.
If you don't need OPenDAP support, then you can try downloading a non-OPenDAP enabled binary.
If you need OPeNDAP support, you may need to install the "OpenSSL" software on your system, or find where it resides on your system and point to it.
To look for a particular missing file, try using the "locate" command:
If you see the file, then read the previous section on the libgfortran issue to see how to point your LD_LIBRARY_PATH environment variable to this location.
If you can't find this file, then you may need to install OpenSSL on your system.
For example, on some Linux systems, you may be able to type:
yum install openssl
apt-get openssl apt-get install openssl
For further information and more links about where to find software, see the previous section on dealing with the missing libgfortran issue. You may simply need to set your LD_LIBRARY_PATH environment variable, or you may need to install some system libraries.
Installing other software for Linux systems
- cairo, X11, and other dependent libraries
- you need an X11 server in order to run ncl and display output to an X11 library, and you need the cairo, X11, and other development libraries in order to build NCL from source code.
Getting the development libraries on your system depends on what kind of Linux system you have. The commands below are samples of the types of commands you can use to install the required software.
apt-get install x11-dev apt-get install xorg-dev apt-get install libx11-dev apt-get install libcairo-devel yum install libX11-devel yum install cairo-devel
If you find other libraries are missing, like "bz2", then you may need additional libraries:
apt-get install libbz2-dev yum install libbz2-dev
You can install these shells with a command like:
apt-get install cshor
yum install tcsh
If any of these instructions are out-of-date, please send email to ncl-install.