Messy ncl installation in 20.04 and fix
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ncl (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hello.
If you look at the instruction of installation of binary or source code compilation from the original source, ncl will traditionally install in
/usr/local/ncl
Then environment NCARG_ROOT is set to /usr/local/ncl. The ncl folder contains bin, lib and include folders.
Various ncl scripts will call upon this environment NCARG_ROOT to load the various libraries and supporting scripts from the ncl package installation. There are also programs like RIP that depends on the classic installation path of ncl.
Installing ncl will install the ncl components in various places, that is:
/usr/bin
/usr/lib/ncarg
/usr/include/ncarg
/usr/share/ncarg
Even more messy is that there is a there is a folder inside /usr/share/ncarg/ and /usr/lib/ncarg that will just point at each other and creating endless loop.
The fix to this messy problem and making sure that the ncl installation will work
For the traditional lib directory and sub directories.
sudo mkdir /usr/local/ncl
sudo mkdir /usr/local/ncl/lib
sudo ln -sf /lib/x86_
sudo mkdir /usr/local/
sudo ln -sf /usr/share/ncarg/* /usr/local/
For the traditional include directory and sub directories.
sudo mkdir /usr/local/
sudo mkdir /usr/local/
sudo ln -sf /usr/include/ncarg* /usr/local/
Optional, remove the link loop
sudo rm /usr/share/
I think there's no need to link the bin directory
Then add in ~./bashrc
export NCARG_ROOT=
Now all typical ncl scripts, whether written by ncl developers themselves (as example) or by ncl users will work. Programs that utilise ncl such as RIP would also work now.
This is important, as ncl development has been discontinued. The binary installation provided by ncl websites still depends on libgfortran3 which has long been discontinued.
description: | updated |
It's useful for me, Thank you very much!