[gdal-dev] Segmentation fault using gdal 1.4.4 and 1.5.2 on netcdf data

Vishal Mehta vishal.mehta at sei-us.org
Thu Aug 14 12:42:06 EDT 2008

Hello all,

I've been having problems getting gdal to work with netcdf files.

Using Ubuntu 8.04 LTS (Hardy)
1. problems with libgdal 1.4.4
First i tried the default gdal versions and libraries installed through Synaptic Package Manager. The packaged version was gdal 1.4.4
 All programs that called gdal - Grass (using r.in.gdal), FWTools and gdalinfo, gdal_translate etc -
gave me a 'segmentation fault'

I then looked up online and this bug report seemed to say it was a fault with how gdal is packaged by Ubuntu - https://bugs.launchpad.net/ubuntu/+source/libgdal-grass/+bug/126916

and the recommendation was to compile from source. So then on to part 2

2. I compiled from source gdal1.5.2 from

using the following configure

./configure --with-netcdf=/usr/lib --with-libtiff=yes --with-geotiff=yes --with-jpeg=/usr/lib --with-gif=/usr/lib --with-png=/ur/lib --with-pg=/usr/bin/pg_config --with-libgrass=yes


sudo make install

and made sure the libgdal link was referring to the new one.

I tried
gdalinfo file.nc

and again got 'segmentation fault'

it works for other data types; only netcdf does not work (just like before with gdal1.4.4)

How can i fix this problem? I am not a linux expert by the way...perhaps that was obvious:)

The .nc file is very large - It iss climate projection data from the California Climate Change Center. All i want to do is automate the extraction of climate data for a set of points - am trying to do the following:

- import .nc data into Grass rasters or GeoTiff with bands = images on the netcdf file
- run a small script to extract climate data for vector point data from each Grass raster/GTiff

Please help,

vishal at vishal-laptop:~/downloads/gdal-1.5.2$ gdalinfo --version
GDAL 1.5.2, released 2008/05/29

Vishal K. Mehta, Ph.D.
Stockholm Environment Institute - US
133 D St Suite F
Davis, CA 95616

More information about the gdal-dev mailing list