How can I fix the error: Required perl module is not installed [GEOIP2::Database::Reader] on the plugin settings page?

The RelayCountry and URILocalBL anti-spam plugins require that the GeoIP2::Database::Reader perl module is installed.

RHEL/Centos/CloudLinux 8/AlmaLinux 8/CloudLinux 8

// AlmaLinux/RockyLinux 8 - enable the powertools repo
yum config-manager --set-enabled powertools

// CloudLinux 8 - enable the powertools repo
yum config-manager --set-enabled cloudlinux-powertools

// install the Perl dependencies
yum install perl-GeoIP2 perl-MaxMind-DB-Reader-XS

RHEL/Centos/CloudLinux 7

// install the Perl dependencies
yum install curl gcc perl perl-core perl-devel perl-App-cpanminus perl-CPAN-Meta perl-CPAN-Meta-YAML \
perl-Clone-PP perl-Data-Dumper perl-Data-Dumper-Concise perl-DateTime perl-DateTime-Locale perl-DateTime-TimeZone \
perl-Dist-CheckConflicts perl-Exporter perl-ExtUtils-MakeMaker perl-File-HomeDir perl-File-ShareDir \
perl-File-ShareDir-Install perl-File-Which perl-Getopt-Long perl-HTTP-Message perl-IO-Compress perl-JSON-MaybeXS \
perl-JSON-PP perl-LWP-Protocol-https perl-Module-Implementation perl-Module-Metadata perl-Module-Runtime \
perl-Module-Runtime perl-Package-Stash perl-Package-Stash-XS perl-Params-Validate perl-Path-Class \
perl-PathTools perl-Role-Tiny perl-Scalar-List-Utils perl-Sort-Naturally perl-Test-Deep perl-Test-Fatal \
perl-Test-Number-Delta perl-Test-Requires perl-Test-Simple perl-Test-Tester perl-Test-Warnings perl-Throwable \
perl-Try-Tiny perl-URI perl-libwww-perl perl-namespace-autoclean perl-namespace-clean

// install the MaxMind GeoIP2::Database::Reader
cpanm GeoIP2::Database::Reader

// Sit back and relax while cpamn builds and installs all the requred perl modules.
// After this completes the GeoIP2::Database::Reader and its dependencies should be installed.

Debian/Ubuntu 20+ / Debian 10+

There are pre-build GeoIP2 packages (including libmaxmind-db-reader-xs-perl for C based lookup for the fastest performance):

apt-get install libgeoip2-perl libmaxminddb0 libmaxmind-db-reader-xs-perl

Debian 9 / Ubuntu 18.04

No pre-built GeoIP2 packages for these OS so we must use cpanm to install them manually.

// install the Perl dependencies
sudo apt-get install perl build-essential libssl-dev cpanminus libfile-which-perl libdata-printer-perl

// install the MaxMind GeoIP2::Database::Reader
sudo cpanm GeoIP2::Database::Reader

// Sit back and relax while cpamn builds and installs all the requred perl modules.
// After this completes the GeoIP2::Database::Reader and its dependencies should be installed.
  • geoip2, maxmind
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How can I fix any statistics generation problems?

Missing the Warden Crontab Entry There is a crontab entry that will update Warden statistics...

How can I fix the error: "milter-reject: END-OF-MESSAGE from..." in the log and found the AV in error (cannot read /etc/clam.d/scan.conf).

Cloudlinux / Imunify360 added their own version of ClamAV to their repo which accidentally...

How can I fix the error: Can't connect to TCP port 10024 on ::1 [Cannot assign requested address] when trying to start Amavis?

When trying to start Amavis you see this in the mail log: Oct 02 03:20:15 condor3648 systemd[1]:...

How can I fix the error: Error [Contentfilter_Settings_Contentfilter]. Message [[QUARANTINEDIR] must be a valid directory?

This error means that Amavis was not installed correctly. Try running the Warden from the command...

How can I fix the error: host 127.0.0.1[127.0.0.1] said: 552 5.3.4 Declared message size (1208029 B) exceeds size limit for recipient?

You can set the message size limit for Amavis under Settings -> Policy Settings -> Misc...