pecl install geoip

I was trying to install geoip for piwik but got this error.

Appreciate help in solving this issue.....

[root@ns4 ~]# pecl install geoip downloading geoip-1.0.8.tgz ... Starting to download geoip-1.0.8.tgz (10,061 bytes) .....done: 10,061 bytes 5 source files, building running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 building in /var/tmp/pear-build-root0xDPbG/geoip-1.0.8 running: /var/tmp/geoip/configure checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib checking for PHP extension directory... /usr/lib64/php/modules checking for PHP installed headers prefix... /usr/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking for geoip support... yes, shared checking for geoip files in default path... not found configure: error: Please reinstall the geoip distribution ERROR: `/var/tmp/geoip/configure' failed

Status: 
Active

Comments

Howdy -- see if it helps to install the geoip devel package, which can be done with this command:

yum install geoip-devel

I tried, but I got: No Such Package

[root@ns4 ~]# yum install geoip-devel Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: repos.dfw.quadranet.com * extras: repos.dfw.quadranet.com * updates: repos.dfw.quadranet.com No package geoip-devel available. Error: Nothing to do [root@ns4 ~]#

Ah, it looks like that package may only be available through EPEL.

Try running this command:

rpm -Uvhhttp://dl.fedoraproject.org/pub/epel/6/x86_64/GeoIP-devel-1.6.5-1.el6.x86_64.rpm

After that, are you then able to install geoip?

Got error again...

[root@ns4 ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/GeoIP-devel-1.6.5-1.el6.x8... Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/GeoIP-devel-1.6.5-1.el6.x8... warning: /var/tmp/rpm-tmp.STNnAZ: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY error: Failed dependencies: GeoIP = 1.6.5-1.el6 is needed by GeoIP-devel-1.6.5-1.el6.x86_64 [root@ns4 ~]#

Currently installed version is GeoIP-1.4.7-0.1.20090931cvs.el6.x86_64

Okay, I believe you can try something like this then:

rpm -UVH https://dl.fedoraproject.org/pub/epel/6/x86_64/GeoIP-1.6.5-1.el6.x86_64.rpm http://dl.fedoraproject.org/pub/epel/6/x86_64/GeoIP-devel-1.6.5-1.el6.x86_64.rpm

That will install both RPM's.

Result of above command: [root@ns4 ~]# rpm -UVH https://dl.fedoraproject.org/pub/epel/6/x86_64/GeoIP-1.6.5-1.el6.x86_64.rpm http://dl.fedoraproject.org/pub/epel/6/x86_64/GeoIP-devel-1.6.5-1.el6.x8... error: open of /usr/share/comps/x86_64/hdlist failed: No such file or directory [root@ns4 ~]#

REsult of [root@ns4 ~]# pecl install geoip pecl/geoip is already installed and is the same as the released version 1.0.8 install failed [root@ns4 ~]#

But the "GeoIP (PECL)" still shows as not installed in piwik