check library version netcdf linux

13,862

Solution 1

netCDF provides the nc-config command line tool for this purpose.

To print the version.

nc-config --version

To print more information on the netCDF build you have:

nc-config --all

Solution 2

Assuming the package is installed, you can use the following command:

dpkg-query --list netcdf

Personally I don't have netcdf installed, but you will have an output like this:

$ dpkg-query --list netbase
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  netbase        5.3          all          Basic TCP/IP networking system
Share:
13,862
Herman Toothrot
Author by

Herman Toothrot

I am an old philosopher, pirate, castaway living on Monkey Island. If a tree falls in the forest and no one is around to hear it, what color is the tree?

Updated on June 13, 2022

Comments

  • Herman Toothrot
    Herman Toothrot about 2 years

    how do I determine which version of the netcdf library is installed in my system? Is there a command line? I tried to search "netcdf" and I find a bunch of files but I can't determine the version number. Is there a command to check the version of anything installed?

    I am on ubuntu