• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Awstats and GeoIP - Statistic page errors: Can't locate Geo/IP.pm and Geo/IP/PurePerl.pm in @INC

quark

Basic Pleskian
Plesk version: Plesk Onyx v17.5.3_build1705170317.16 os_CentOS 7

Steps:
1. I installed geoip for all PHP versions:
Code:
# yum install geoip-devel

# pecl install geoip
# echo 'extension=geoip.so' > /etc/php.d/geoip.ini

# /opt/plesk/php/5.6/bin/pecl install geoip
# echo 'extension=geoip.so' > /opt/plesk/php/5.6/etc/php.d/geoip.ini

# /opt/plesk/php/7.0/bin/pecl install geoip-1.1.1
# echo 'extension=geoip.so' > /opt/plesk/php/7.0/etc/php.d/geoip.ini

# /opt/plesk/php/7.1/bin/pecl install geoip-1.1.1
# echo 'extension=geoip.so' > /opt/plesk/php/7.1/etc/php.d/geoip.ini

# plesk bin php_handler --reread

2. I added LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat" in:
/etc/awstats/awstats.conf
/etc/awstats/awstats.model.conf and
/usr/local/psa/etc/awstats/awstats.domain.tld-http.conf

3. I copied latest GeoIP.dat file to /usr/share/GeoIP/GeoIP-initial.dat

4. Installed perl cpan and GeoIP perl modules Geo::IP:: PurePerl, Geo::IP, YAML (like in: Statistics page fails to open with error: Plugin load for plugin 'geoip' failed)

Code:
# yum install perl-CPAN perl-CPAN-Changes perl-CPAN-Meta perl-CPAN-Meta-Requirements
# cpan install CPAN
# cpan reload CPAN

# perl -MCPAN -e "install Geo::IP::PurePerl"
# perl -MCPAN -e "install Geo::IP"
# cpan -i YAML

5. When trying to access Plesk Web Statistics for a domain, the following errors appears:
Code:
Error: Plugin load for plugin 'geoip' failed with return code: Error:
Can't locate Geo/IP.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /var/www/cgi-bin/awstats/lib /var/www/cgi-bin/awstats/plugins) at (eval 4) line 1.
Can't locate Geo/IP/PurePerl.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /var/www/cgi-bin/awstats/lib /var/www/cgi-bin/awstats/plugins) at (eval 5) line 1. Error: Need Perl module Geo::IP or Geo::IP::PurePerl 

Setup ('/usr/local/psa/etc/awstats/awstats.domain.tld-http.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

How can I fix these errors?
Thank you.
 
Even though, when I posted the above thread, I tried to update the statistics several times and the error was still present, now (after a couple of days) I visited the Web Statistic page again and the error is gone ... So... I think it's a miraculous self-healing :) or my statistic update procedure wasn't correct...
 
Back
Top