Description of problem: apcupsd-cgi lists that it requires libgd.so.2(64 bit) but it does not work unless 32 bit is installed. Version-Release number of selected component (if applicable): apcupsd-cgi-3.14.4-2.fc9.x86_64 How reproducible: Always Steps to Reproduce: 1.Install apcupsd-cgi (x86_64) 2.Install gd (x86_64) 3.go to apcupsd webpage Actual results: No graphs, "premature end of script headers" in apache log Expected results: beautiful graphs Additional info: Installing gd.i386 fixes this but apcupsd-cgi does not list that as a dependency. upsimage.cgi looks for libgd.so.2 in /lib/ but gd(64 bit) installs it in /usr/lib64/
This looks like a bug -- cgi scripts should look for the library in the correct location. Thanks for reporting.
I failed to reporoduce the bug. On a system with only 64-bit gd installed the apcupsd web pages seem to look OK. Could you please post output of ldd /var/www/apcupsd/upsimage.cgi?
linux-gate.so.1 => (0x00110000) libwrap.so.0 => /lib/libwrap.so.0 (0x00111000) libgd.so.2 => /usr/lib/libgd.so.2 (0x0011a000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0015e000) libc.so.6 => /lib/libc.so.6 (0x00a04000) /lib/ld-linux.so.2 (0x009e4000) libnsl.so.1 => /lib/libnsl.so.1 (0x0016c000) libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00186000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00197000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00298000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x002bb000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x002ea000) libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00379000) libz.so.1 => /lib/libz.so.1 (0x003a1000) libm.so.6 => /lib/libm.so.6 (0x003b5000) libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x003de000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x003e0000) libdl.so.2 => /lib/libdl.so.2 (0x00cdb000) libexpat.so.1 => /lib/libexpat.so.1 (0x003fc000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00423000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00426000)
Hello, on my system I get: # ldd /var/www/apcupsd/upsimage.cgi linux-vdso.so.1 => (0x00007fffc2bfe000) libwrap.so.0 => /lib64/libwrap.so.0 (0x0000003882600000) libgd.so.2 => /usr/lib64/libgd.so.2 (0x0000003883a00000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003888e00000) libc.so.6 => /lib64/libc.so.6 (0x0000003882200000) /lib64/ld-linux-x86-64.so.2 (0x0000003881e00000) libnsl.so.1 => /lib64/libnsl.so.1 (0x000000388de00000) libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x0000003898200000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003884e00000) libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x000000388e600000) libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x0000003886e00000) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0000003885e00000) libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0000003886200000) libz.so.1 => /lib64/libz.so.1 (0x0000003883200000) libm.so.6 => /lib64/libm.so.6 (0x0000000000110000) libxcb-xlib.so.0 => /usr/lib64/libxcb-xlib.so.0 (0x0000003884a00000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x0000003884600000) libdl.so.2 => /lib64/libdl.so.2 (0x0000003882a00000) libexpat.so.1 => /lib64/libexpat.so.1 (0x0000003885a00000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003884200000) libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x0000003885200000) Are you sure you have a 64bit package installed: # rpm -q --qf="%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" apcupsd-cgi apcupsd-cgi-3.14.4-2.fc9.x86_64 and there are no dependency problems on your system?: # package-cleanup --problems # this utility is in the yum-utils package Setting up yum Reading local RPM database Processing all local requires No problems found
I got the same as you: [root@arturo ~]# rpm -q --qf="%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" apcupsd-cgi apcupsd-cgi-3.14.4-2.fc9.x86_64 [root@arturo ~]# package-cleanup --problems Setting up yum Reading local RPM database Processing all local requires No problems found
Why do you have the 32-bit libraries even installed (others than libgd)? Not all of them are gd.i386 dependencies so I expect you must have had them installed beforehand. What output will you get of 'ldd /usr/lib64/libgd.so.2'? What is the output of 'file /var/www/apcupsd/upsimage.cgi'? I'm sorry, but this looks like not a bug in apcupsd but more like a messed up system. Did you upgrade from 32-bit version?
This was a fresh install. [root@arturo ~]# ldd /usr/lib64/libgd.so.2 linux-vdso.so.1 => (0x00007fffa51fe000) libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x0000003d87c00000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003310600000) libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x0000003319600000) libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00000030f6c00000) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00000030f6800000) libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0000003d82400000) libz.so.1 => /lib64/libz.so.1 (0x000000330c600000) libm.so.6 => /lib64/libm.so.6 (0x000000330ba00000) libc.so.6 => /lib64/libc.so.6 (0x000000330ae00000) libxcb-xlib.so.0 => /usr/lib64/libxcb-xlib.so.0 (0x0000003310a00000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x0000003310200000) libdl.so.2 => /lib64/libdl.so.2 (0x000000330b200000) libexpat.so.1 => /lib64/libexpat.so.1 (0x000000330ea00000) /lib64/ld-linux-x86-64.so.2 (0x000000330aa00000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003311200000) libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x0000003310e00000) [root@arturo ~]# file /var/www/apcupsd/upsimage.cgi /var/www/apcupsd/upsimage.cgi: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped 32-bit?? How did that happen? I will re-install it from a different mirror.
(In reply to comment #7) > [root@arturo ~]# file /var/www/apcupsd/upsimage.cgi > /var/www/apcupsd/upsimage.cgi: ELF 32-bit LSB executable, Intel 80386, version 1 > (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped > > 32-bit?? How did that happen? I will re-install it from a different mirror. Fine. Please let me know whether reinstalling would help. Also it may be helpful to run rpm -qi apsupsd-cgi and post the output here. Thanks.
Reinstall fixed it.. [root@arturo ~]# rpm -qi apcupsd-cgi Name : apcupsd-cgi Relocations: (not relocatable) Version : 3.14.4 Vendor: Fedora Project Release : 2.fc9 Build Date: Fri 06 Jun 2008 06:23:43 AM EDT Install Date: Thu 24 Jul 2008 11:41:00 AM EDT Build Host: hammer2.fedora.redhat.com Group : Applications/Internet Source RPM: apcupsd-3.14.4-2.fc9.src.rpm Size : 252615 License: GPLv2 Signature : DSA/SHA1, Fri 13 Jun 2008 10:35:37 AM EDT, Key ID b44269d04f2a6fd2 Packager : Fedora Project URL : http://www.apcupsd.com Summary : Web interface for apcupsd Description : A CGI interface to the APC UPS monitoring daemon.