FreeBSD – Error: Can’t locate Geo/IP.pm

AWstats에 GeoIP를 사용하려고 해보니.. 이런.. Geo/IP.pm 에러가 뜨는군요..

[root@yongbok ~]# /usr/local/awstats/tools/awstats_updateall.pl now
Running ‘”/usr/local/awstats/wwwroot/cgi-bin/awstats.pl” -update -config=mirror -configdir=”/etc/awstats”‘ to update config mirror
Error: Plugin load for plugin ‘geoip’ failed with return code: Error:
Can’t locate Geo/IP.pm in @INC (@INC contains: /usr/local/lib/perl5/5.10.1/BSDPAN /usr/local/lib/perl5/site_perl/5.10.1/mach /usr/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/5.10.1/mach /usr/local/lib/perl5/5.10.1 . /usr/local/awstats/wwwroot/cgi-bin/lib /usr/local/awstats/wwwroot/cgi-bin/plugins) at (eval 4) line 1.
Can’t locate Geo/IP/PurePerl.pm in @INC (@INC contains: /usr/local/lib/perl5/5.10.1/BSDPAN /usr/local/lib/perl5/site_perl/5.10.1/mach /usr/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/5.10.1/mach /usr/local/lib/perl5/5.10.1 . /usr/local/awstats/wwwroot/cgi-bin/lib /usr/local/awstats/wwwroot/cgi-bin/plugins) at (eval 5) line 1.
Error: Need Perl module Geo::IP or Geo::IP::PurePerl
Setup (‘/etc/awstats/awstats.mirror.conf’ file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in ‘docs’ directory).

구글에 검색을 해보았더니 cpan을 이용하면 되더군요.

[root@yongbok ~]# cpan Geo::IP::PurePerl Geo::IP
[root@yongbok ~]# /usr/local/awstats/tools/awstats_updateall.pl now
Running ‘”/usr/local/awstats/wwwroot/cgi-bin/awstats.pl” -update -config=mirror -configdir=”/etc/awstats”‘ to update config mirror
Create/Update database for config “/etc/awstats/awstats.mirror.conf” by AWStats version 7.0 (build 1.971)
From data in log file “/mirror3/mirror-access.log”…
Phase 1 : First bypass old records, searching new record…
Direct access after last parsed record (after line 127123)
Jumped lines in file: 127123
Found 127123 already parsed records.
Parsed lines in file: 426
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 426 new qualified records.

참고
http://howtobsd.com/?p=138

Comments

comments

  • http://www.yongbok.net/blog/ ruo91

    Thanks :D

  • http://www.onlinepregnancyquiz.org Lawrence

    Your place is valueble for me.Thanks!