[CentOS] centos 5.3 install ncview X libraries error and netcdf header error

Fri Nov 6 20:29:31 UTC 2009
Dave <tdbtdb+centos at gmail.com>

I was trying to install software named ncview on a centos 5.3 box.
./configure command gave this error:

Error, the X libraries and development headers must be installed for ncview
to work!

I was surprised that there were many google hits related to ubuntu, none for
centos. So even though I eventually figured out what to do, I decided to
share this with the list anyhow, so maybe next time I google that error I'll
get this post.

The X error message would have been much more helpful if it was more
specific about what exactly is missing. "X libraries and headers" just
covers too much territory.

Google said the ubuntu flavored problem was solved by ./configure
--x-libraries=/usr/lib64 (or wherever the necessary libraries are). After
much finagling, I solved my problem by installing
xorg-x11-proto-devel-7.1-13.el5 package (has headers in it) and using this
command:

./configure  --x-libraries=/usr/lib64 --x-includes=/usr/include/X11

That got past the X check, but then I got this error:

checking for /sw/include/netcdf.h... no
Fatal error: I cannot find the directory that holds the netcdf include file
netcdf.h!

A bit more digging and success with:

  ./configure  --x-libraries=/usr/lib64 --x-includes=/usr/include/X11
--with-netcdf_incdir=/usr/include/netcdf-3

I'm still not sure exactly which X libraries were required in addition to
the header package (xorg-x11-proto-devel-7.1-13.el5).

Fedora has (used to have?) an rpm for ncview, I wish centos did.
best,
Dave

p.s.
I figured out where the 'X headers' were by using this command:
  yum search xorg|grep -i headers

./configure --help told me the header switch and the netcdf switch.

figure out netcdf:

 rpm -qa|grep netcdf
netcdf-static-3.6.2-7.el5
netcdf-3.6.2-7.el5
netcdf-devel-3.6.2-7.el5
[root at sock ncview-1.93g]# rpm -qs netcdf-devel|grep 'netcdf.h$'
normal        /usr/include/netcdf-3/netcdf.h

more details:

[root at sock ncview-1.93g]# ./configure
[snip]
checking for ANSI C header files... yes
checking for X... no
Error, the X libraries and development headers must be installed for ncview
to work!

[root at sock ncview-1.93g]# ./configure  --x-libraries=/usr/lib64
[snip]
checking for X... no
Error, the X libraries and development headers must be installed for ncview
to work!

[root at sock ncview-1.93g]# yum search xorg|grep -i headers
xorg-x11-proto-devel.i386 : X.Org X11 Protocol headers
xorg-x11-proto-devel.x86_64 : X.Org X11 Protocol headers

[root at sock ncview-1.93g]# rpm -q xorg-x11-proto-devel.x86_64
xorg-x11-proto-devel-7.1-13.el5

[root at sock ncview-1.93g]# ls /usr/lib64/lib[xX]*
/usr/lib64/libx11globalcomm.la        /usr/lib64/libXinerama.so.1.0.0
/usr/lib64/libx11globalcomm.so        /usr/lib64/libXi.so.6
/usr/lib64/libx11globalcomm.so.1      /usr/lib64/libXi.so.6.0.0
/usr/lib64/libx11globalcomm.so.1.0.0  /usr/lib64/libxkbfile.so.1
/usr/lib64/libX11.so                  /usr/lib64/libxkbfile.so.1.0.2
/usr/lib64/libX11.so.6                /usr/lib64/libxklavier.so.11
/usr/lib64/libX11.so.6.2.0            /usr/lib64/libxklavier.so.11.0.0
/usr/lib64/libx2sys.so                /usr/lib64/libxml2.so.2
/usr/lib64/libx2sys.so.4              /usr/lib64/libxml2.so.2.6.26
/usr/lib64/libXau.so                  /usr/lib64/libXm.so.4
/usr/lib64/libXau.so.6                /usr/lib64/libXm.so.4.0.1
/usr/lib64/libXau.so.6.0.0            /usr/lib64/libXmu.so.6
/usr/lib64/libXaw3d.so.7              /usr/lib64/libXmu.so.6.2.0
/usr/lib64/libXaw3d.so.7.0            /usr/lib64/libXmuu.so.1
/usr/lib64/libXaw6.so.6               /usr/lib64/libXmuu.so.1.0.0
/usr/lib64/libXaw6.so.6.0.1           /usr/lib64/libXpm.so.4
/usr/lib64/libXaw7.so.7               /usr/lib64/libXpm.so.4.11.0
/usr/lib64/libXaw7.so.7.0.0           /usr/lib64/libXp.so.6
/usr/lib64/libXaw.so.6                /usr/lib64/libXp.so.6.2.0
/usr/lib64/libXaw.so.7                /usr/lib64/libXrandr.so.2
/usr/lib64/libXbae.so.4               /usr/lib64/libXrandr.so.2.0.0
/usr/lib64/libXbae.so.4.0.60          /usr/lib64/libXrender.so.1
/usr/lib64/libXcomposite.so.1         /usr/lib64/libXrender.so.1.3.0
/usr/lib64/libXcomposite.so.1.0.0     /usr/lib64/libXRes.so.1
/usr/lib64/libXcursor.so.1            /usr/lib64/libXRes.so.1.0.0
/usr/lib64/libXcursor.so.1.0.2        /usr/lib64/libxslt.so.1
/usr/lib64/libXdamage.so.1            /usr/lib64/libxslt.so.1.1.17
/usr/lib64/libXdamage.so.1.0.0        /usr/lib64/libXss.so.1
/usr/lib64/libXdmcp.so                /usr/lib64/libXss.so.1.0.0
/usr/lib64/libXdmcp.so.6              /usr/lib64/libXTrap.so.6
/usr/lib64/libXdmcp.so.6.0.0          /usr/lib64/libXTrap.so.6.4.0
/usr/lib64/libXevie.so.1              /usr/lib64/libXt.so.6
/usr/lib64/libXevie.so.1.0.0          /usr/lib64/libXt.so.6.0.0
/usr/lib64/libXext.so.6               /usr/lib64/libXtst.so.6
/usr/lib64/libXext.so.6.4.0           /usr/lib64/libXtst.so.6.1.0
/usr/lib64/libXfixes.so.3             /usr/lib64/libXv.so.1
/usr/lib64/libXfixes.so.3.1.0         /usr/lib64/libXv.so.1.0.0
/usr/lib64/libXfontcache.so.1         /usr/lib64/libXxf86dga.so.1
/usr/lib64/libXfontcache.so.1.0.0     /usr/lib64/libXxf86dga.so.1.0.0
/usr/lib64/libXfont.so.1              /usr/lib64/libXxf86misc.so.1
/usr/lib64/libXfont.so.1.4.1          /usr/lib64/libXxf86misc.so.1.1.0
/usr/lib64/libXft.so.2                /usr/lib64/libXxf86vm.so.1
/usr/lib64/libXft.so.2.1.2            /usr/lib64/libXxf86vm.so.1.0.0
/usr/lib64/libXinerama.so.1


[root at sock ncview-1.93g]# rpm -qa|grep xorg
xorg-x11-server-Xnest-1.1.1-48.52.el5
xorg-x11-fonts-misc-7.1-2.1.el5
xorg-x11-drv-magictouch-1.0.0.5-2.1
xorg-x11-drv-fbdev-0.3.0-2
xorg-x11-drv-jamstudio-1.1.0-1.1
xorg-x11-drv-spaceorb-1.1.0-1.1
xorg-x11-drv-vga-4.1.0-2.1
xorg-x11-drv-evdev-1.0.0.5-3.el5
xorg-x11-fonts-75dpi-7.1-2.1.el5
xorg-x11-drv-void-1.1.0-3.1
xorg-x11-drv-keyboard-1.1.0-3
xorg-x11-drv-elographics-1.1.0-1.1
xorg-x11-drv-i810-1.6.5-9.21.el5
xorg-x11-drv-microtouch-1.1.0-1.1
xorg-x11-drv-ur98-1.1.0-1.1
xorg-x11-drv-siliconmotion-1.4.1-2.1
xorg-x11-drv-mutouch-1.1.0-3
xorg-x11-proto-devel-7.1-13.el5
xorg-x11-apps-7.1-4.0.1.el5
xorg-x11-fonts-Type1-7.1-2.1.el5
xorg-x11-fonts-100dpi-7.1-2.1.el5
xorg-x11-drv-tdfx-1.2.1-3.1
xorg-x11-drv-dmc-1.1.0-2
xorg-x11-drv-palmax-1.1.0-1.1
xorg-x11-drv-ast-0.81.0-3
xorg-x11-drv-trident-1.2.1-3.fc6
xorg-x11-drv-s3virge-1.9.1-2.1
xorg-x11-drv-s3-0.4.1-2.1
xorg-x11-drv-citron-2.2.0-1.1
xorg-x11-drv-sis-0.9.1-7.1.el5
xorg-x11-drv-sisusb-0.8.1-4.1
xorg-x11-drv-dummy-0.2.0-2.1
xorg-x11-drivers-7.1-4.1.el5
xorg-x11-filesystem-7.1-2.fc6
xorg-x11-server-utils-7.1-4.fc6
xorg-x11-fonts-base-7.1-2.1.el5
xorg-x11-xfs-1.0.2-4
xorg-x11-fonts-ISO8859-1-75dpi-7.1-2.1.el5
xorg-x11-fonts-truetype-7.1-2.1.el5
xorg-x11-drv-penmount-1.1.0-2.1
xorg-x11-drv-savage-2.1.1-5.fc6
xorg-x11-drv-joystick-1.1.0-1.1
xorg-x11-drv-magellan-1.1.0-1.1
xorg-x11-drv-fpit-1.1.0-1.1
xorg-x11-drv-calcomp-1.1.0-1.1
xorg-x11-drv-vmmouse-12.4.0-2.1
xorg-x11-drv-acecad-1.1.0-2.1
xorg-x11-drv-elo2300-1.1.0-1.1
xorg-x11-drv-digitaledge-1.1.0-1.1
xorg-x11-drv-nv-2.1.12-3.el5
xorg-x11-drv-vesa-1.3.0-8.1.el5
xorg-x11-xauth-1.0.1-2.1
xorg-x11-twm-1.0.1-3.1
xorg-x11-xinit-1.0.2-15.el5
xorg-x11-utils-7.1-2.fc6
xorg-x11-fonts-ISO8859-1-100dpi-7.1-2.1.el5
xorg-x11-server-Xorg-1.1.1-48.52.el5
xorg-x11-drv-hyperpen-1.1.0-2
xorg-x11-drv-ati-6.6.3-3.22.el5
xorg-x11-drv-vmware-10.13.0-2.1
xorg-x11-drv-mga-1.4.2-10.el5
xorg-x11-drv-via-0.2.1-9
xorg-x11-drv-summa-1.1.0-1.1
xorg-x11-xkb-utils-1.0.2-2.1
xorg-x11-font-utils-7.1-2
xorg-x11-drv-mouse-1.1.1-1.1
xorg-x11-drv-tek4957-1.1.0-1.1
xorg-x11-drv-aiptek-1.0.1-2
xorg-x11-drv-voodoo-1.1.0-3.1
xorg-x11-drv-cirrus-1.1.0-2.fc6
xorg-x11-drv-dynapro-1.1.0-2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20091106/06dcf90d/attachment-0004.html>