LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   squid + sarg problem (https://www.linuxquestions.org/questions/slackware-14/squid-sarg-problem-4175528635/)

bassmadrigal 12-21-2014 02:16 PM

Ok, try the following

Code:

su -
removepkg sarg
mkdir sarg
cd sarg
wget https://raw.githubusercontent.com/conraid/SlackBuilds/master/sarg/sarg.SlackBuild
wget https://raw.githubusercontent.com/conraid/SlackBuilds/master/sarg/doinst.sh
wget https://raw.githubusercontent.com/conraid/SlackBuilds/master/sarg/slack-desc
wget http://downloads.sourceforge.net/project/sarg/sarg/sarg-2.3.9/sarg-2.3.9.tar.gz
chmod +x sarg.Slackbuild
./sarg.Slackbuild
installpkg sarg-2.3.9-x86_64-1cf.txz      ##or replace x86_64 with i686 if you're running 32bit Slackware

If you get any errors, paste them here. I was able to successfully compile the program, although, I'm waiting for squid to compile to make sure it works (when I try to open sarg, it complains that there's no squid logfile, but no errors about libpng :) )

bassmadrigal 12-21-2014 02:22 PM

Just verified it, and it works fine.

Code:

root@craven-moorhead:~/sarg# sarg
SARG: Records in file: 0, reading: 100.00%
SARG: No records found
SARG: End


cent4 12-21-2014 02:37 PM

All ok about instalation but the same error:
root@server:~/sarg# sarg
Quote:

SARG: Records in file: 3536981, reading: 100.00%
libpng warning: Application was compiled with png.h from libpng-1.4.5
libpng warning: Application is running with png.c from libpng-1.2.44
gd-png: fatal libpng error: Incompatible libpng version in application and library
Segmentation fault

bassmadrigal 12-21-2014 03:36 PM

That's weird, I don't have png.c on my system (14.1 64bit). Maybe it was included in previous versions of Slackware? Try running the following and paste the output so we can see where it is and what it was included in.

Code:

locate png.c
grep png.c /var/log/packages/*

If it comes from libpng, you can try reinstalling libpng. I don't know if you're running 32bit or 64bit, so I linked to both. Reinstall it using the command upgradepkg --reinstall $PACKAGENAME. Replace $PACKAGENAME with the package you downloaded.

If png.c comes from a different package, you can try and download that one and reinstall it.

cent4 12-21-2014 03:39 PM

rootserver:/# locate png.c
Quote:

/root/gd-2.0.33/gd2topng.c
/root/gd-2.0.33/webpng.c
/root/gd-2.0.33/gdtopng.c
/root/gd-2.0.33/gdparttopng.c
/root/gd-2.0.33/gd_png.c
root@server:/# grep png.c /var/log/packages/*
Quote:

root@server:/#

cent4 12-21-2014 03:44 PM

root@server:/# upgradepkg --reinstall libpng-1.4.5-x86_64-1
Quote:

Cannot install libpng-1.4.5-x86_64-1: file not found

bassmadrigal 12-21-2014 04:13 PM

So you have the 64bit version of Slack (I hope so, because that's what the rest of my commands are assuming)? Did you download the libpng I linked to eariler? If so, you'd need to either move it to your current directory or point upgradepkg to the location of the file. upgradepkg --reinstall /location/to/libpng-1.4.5-x86_64-1.txz (note, you need the .txz at the end of it).

But it looks like you might've tried downgrading your gd library, since 13.37 comes with 2.0.35 and your root directory shows 2.0.33. Try upgrading that to the correct 13.37 version (the --reinstall forces it to reinstall the program, even if the versions appear the same; --install-new will have it install the program if there isn't one currently installed).

Code:

wget http://slackbuilds.org/mirror/slackware/slackware64-13.37/slackware64/l/gd-2.0.35-x86_64-4.txz
upgradepkg --reinstall --install-new gd-2.0.35-x86_64-4.txz

Then try and run sarg again and paste any errors.

cent4 12-21-2014 04:25 PM

root@server:~/!JACEK# upgradepkg --reinstall libpng-1.4.5-x86_64-1.txz
ok

root@server:/# upgradepkg --reinstall --install-new gd-2.0.35-x86_64-4.txz
Package gd-2.0.35-x86_64-4 upgraded with new package ./gd-2.0.35-x86_64-4.txz.
ok

root@server:/# sarg
Quote:

SARG: Records in file: 3536981, reading: 100.00%
libpng warning: Application was compiled with png.h from libpng-1.4.5
libpng warning: Application is running with png.c from libpng-1.2.44
gd-png: fatal libpng error: Incompatible libpng version in application and library
Segmentation fault

bassmadrigal 12-21-2014 04:39 PM

I'm at a loss. Slackware 13.37 came with libpng 1.4.5, so I don't know why there'd be any claim of libpng 1.2.44. I'm guessing there's something screwed up with your install (maybe you manually installed something which overwrote important files). It might be worth backing up what's needed, and then wiping and installing Slackware 14.1.

cent4 12-22-2014 03:49 AM

It's verry bad news form me ;-(.
I was hope You can help me to remove my trouble but thank You verry verry much ;-)

cent4 12-22-2014 03:50 AM

I don't install this slackware. I have it from other IT manager, who is not work in our company

ponce 12-22-2014 04:05 AM

you can try executing this command (to move the old binary in /usr/local/bin out of the way)
Code:

mv /usr/local/bin/sarg /usr/local/bin/sarg.old
then try executing again
Code:

which sarg
sarg -v

and post the output of these two commands

cent4 12-22-2014 04:13 AM

root@server:/# which sarg
Quote:

/usr/bin/sarg
root@server:/# sarg -v
Quote:

SARG Version: 2.3.9 Sep-21-2014

ponce 12-22-2014 04:25 AM

try using it now, you should be using the version of the package you built.

cent4 12-22-2014 04:33 AM

root@server:~/!JACEK# sarg
Quote:

SARG: Unknown option language Polish
SARG: Records in file: 3536981, reading: 100.00%
libpng warning: Application was compiled with png.h from libpng-1.4.5
libpng warning: Application is running with png.c from libpng-1.2.44
gd-png: fatal libpng error: Incompatible libpng version in application and library
Segmentation fault
;-( Meaby I have bad sarg.conf?
I don't know what to do, my boss will be not happy when I can't to do this ;-(


All times are GMT -5. The time now is 07:10 PM.