[libcf] libnetcdf.so.4 error while installing quantum gis

Hi all!

I have been trying to install qgis 1.6.0 from source since two days now. I
get the following error everytime:
/usr/bin/ld: warning: libnetcdf.so.4, needed by /usr/local/lib/libgdal.so,
not found (try using -rpath or -rpath-link)
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_vartype'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_att_double'
/usr/local/lib/libgdal.so: undefined reference to `nc_strerror'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_vara_uchar'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_att_short'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_att_text'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_var'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_vara_short'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_att_short'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_vara_short'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_varndims'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_nvars'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_dimname'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_att_float'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_vara_uchar'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_vara_int'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_vara_float'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_att_uchar'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_vardimid'
/usr/local/lib/libgdal.so: undefined reference to `nc_def_var'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_att_double'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_att'
/usr/local/lib/libgdal.so: undefined reference to `nc_def_dim'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_att_float'
/usr/local/lib/libgdal.so: undefined reference to `nc_redef'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_varnatts'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_vara_int'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_att_int'
/usr/local/lib/libgdal.so: undefined reference to `nc_close'
/usr/local/lib/libgdal.so: undefined reference to `nc_enddef'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_varid'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_vara_float'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_vara_double'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_ndims'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_dimlen'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_att_int'
/usr/local/lib/libgdal.so: undefined reference to `nc_get_att_text'
/usr/local/lib/libgdal.so: undefined reference to `nc_create'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_attname'
/usr/local/lib/libgdal.so: undefined reference to `nc_put_vara_double'
/usr/local/lib/libgdal.so: undefined reference to `nc_inq_varname'
/usr/local/lib/libgdal.so: undefined reference to `nc_open'
collect2: ld returned 1 exit status
make[2]: *** [src/app/qgis] Error 1
make[1]: *** [src/app/CMakeFiles/qgis.dir/all] Error 2
make: *** [all] Error 2

I use Ubuntu 10.10 64-bit and also have GRASS GIS installed. I have also
tried after installing libnetcdf-dev and libnetcdf6 packages but no luck.
When I try to invoke any gdal module in GRASS I get a similar error:

gdal_translate: error while loading shared libraries: libnetcdf.so.4: cannot
open shared object file: No such file or directory

Please help me sort out this issue.

Thanks and regards,

Chethan S.