• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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