The following is a compilation of the possible Perl errors one may encounter as well as their solutions.

Net::DNS

Error

Can't locate Net/DNS.pm in @INC
1

Solution

  • yum
yum install perl-Net-DNS
1
  • apt-get
apt-get install libnet-dns-perl
1
  • cpan
cpan -i Net::DNS
1

Version

Error

spamd[1234]: Can't locate version.pm in @INC
1

Solution

  • yum
yum install perl-version
1
  • apt-get
apt-get install libperl-version-perl
1
  • cpan
cpan -i version
1

Bundle::LWP

Error

Can't locate LWP/UserAgent.pm in @INC ...
1

Solution

  • yum
yum install perl-libwww-perl
1
  • apt-get
apt-get install libwww-perl
1
  • cpan
perl -MCPAN -e 'install Bundle::LWP'
1

Archive::Tar

Error

Can't locate Archive/Tar.pm in @INC
1

Solution

  • yum
yum install perl-Archive-Tar
1
  • apt-get
apt-get install perl-modules
1
  • cpan
cpan -i Archive::Tar
1

HTML::Parser

Error

Can't locate HTML/Parser.pm in @INC
1

Solution

  • yum
yum install perl-HTML-Parser
1
  • apt-get
apt-get install libhtml-parser-perl
1
  • cpan
cpan -i HTML::Parser
1

DBD::mysql

Error

Can't locate DBD::mysql.pm in @INC
1

Solution

  • yum
yum install perl-DBD-MySQL
1
  • apt-get
apt-get install libdbd-mysql-perl
1
  • cpan
cpan -i 'install Bundle::DBD::mysql'
1

ExtUtils::Embed

Error

Please install ExtUtils::Embed for /usr/bin/perl
1

Solution

  • yum
yum install perl-ExtUtils-Embed
1
  • apt-get
apt-get install perl-modules
1
  • cpan
cpan -i ExtUtils::Embed
1
>>> Creating lookups/Makefile for building dynamic modules
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
       LANGUAGE = (unset),
       LC_ALL = (unset),
       LC_CTYPE = "UTF-8",
       LANG = "C"
   are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Please install ExtUtils::Embed for /usr/bin/perl
make: *** [configure] Error 1

*** The make has failed, would you like to try to make again? (y,n):
1
2
3
4
5
6
7
8
9
10
11
12
13

where a reported solution is to use:

cd /usr/local/directadmin/custombuild
LC_ALL=C ./build exim
1
2

if you've already added the ExtUtils::Embed module, but are still getting the error.

NetAddr::IP

Error

REQUIRED module missing: NetAddr::IP
1

Solution

  • yum
yum install perl-NetAddr-IP.x86_64
1
  • apt-get
apt-get install libnetaddr-ip-perl
1
  • cpan
cpan -i NetAddr::IP
1

Compress::Raw::Zlib

Error

Can't locate Compress/Raw/Zlib.pm in @INC
1

Solution

  • yum
yum install perl-Compress-Raw-Zlib
1
  • apt-get
apt-get install libcompress-raw-zlib-perl
1
  • cpan
cpan -i Compress::Raw::Zlib
1

Crypt::OpenSSL::DSA

Error

perl: symbol lookup error: /usr/lib64/perl5/vendor_perl/auto/Crypt/OpenSSL/DSA/DSA.so: undefined symbol: Perl_Gthr_key_ptr
1

Solution

  • yum
yum install perl-Crypt-OpenSSL-DSA
1
  • apt-get
apt-get install libcrypt-openssl-dsa-perl
1
  • cpan
cpan -i Crypt::OpenSSL::DSA
1

Mail::SPF

Error

Error: Failed test 'POD test for blib/lib/Mail/SPF/Util.pm' at /usr/local/share/perl/5.24.1/Test/Pod.pm line 187.	
1

If you run into this perl Mail::SPF build error with cpan,:

root@server# cpan -i Mail::SPF

Reading '/root/.cpan/Metadata'
 Database was generated on Thu, 31 Aug 2017 09:17:03 GMT
Running install for module 'Mail::SPF'
Checksum for /root/.cpan/sources/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz ok
Configuring J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz with Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Mail-SPF' version 'v2.9.0'
 JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz
 /usr/bin/perl Build.PL --installdirs site -- OK
Running Build for J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz
Building Mail-SPF
 JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz
 ./Build -- OK
Running Build test
t/00.00-class-misc.t .......... ok
t/00.01-class-util.t .......... ok
t/00.02-class-request.t ....... ok
t/00.03-class-result.t ........ ok
t/00.04-class-server.t ........ ok
t/00.05-class-macrostring.t ... ok
t/00.99-class-misc.t .......... ok
t/10.00-rfc4408.t ............. skipped: Mail::SPF::Test required for testing Mail::SPF's RFC compliance
t/10.01-rfc4406.t ............. skipped: Mail::SPF::Test required for testing Mail::SPF's RFC compliance
t/90-author-pod-validation.t .. 1/27
#   Failed test 'POD test for blib/lib/Mail/SPF/Util.pm'
#   at /usr/local/share/perl/5.24.1/Test/Pod.pm line 187.
# blib/lib/Mail/SPF/Util.pm (157): L<> starts or ends with whitespace
# blib/lib/Mail/SPF/Util.pm (157): L<> starts or ends with whitespace
# Looks like you failed 1 test of 27.
t/90-author-pod-validation.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/27 subtests

Test Summary Report
----------
t/90-author-pod-validation.t (Wstat: 256 Tests: 27 Failed: 1)
 Failed test:  3
 Non-zero exit status: 1
Files=10, Tests=159,  1 wallclock secs ( 0.05 usr  0.01 sys +  1.07 cusr  0.13 csys =  1.26 CPU)
Result: FAIL
Failed 1/10 test programs. 1/159 subtests failed.
 JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz
 ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
 reports JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

a reported fix is to install it manually with a patch:

perl -MCPAN -e "get('Mail::SPF')"
cd ~/.cpan/sources/authors/id/J/JM/JMEHNLE/mail-spf/
tar -xzvf Mail-SPF-v2.9.0.tar.gz
cd Mail-SPF-v2.9.0/

#manually patched blib/lib/Mail/SPF/Util.pm with the changes from Util.pm-patch.gz found at https://rt.cpan.org/Public/Bug/Display.html?id=93241
#extracted here: http://files1.directadmin.com/services/all/perl_modules/Mail-SPF/Util.pm-patch
#basically just swapping out the 3 ! lines from top, to the bottom 3 ! lines.

perl Build.PL
./Build
./Build test
./Build install
1
2
3
4
5
6
7
8
9
10
11
12
13

Compilation of any package from CPAN manually:

If you want to install package version .

wget "http://www.cpan.org/modules/by-module/Archive/net-DNS-1.20.tar.gz"
tar xvzf "net-DNS-1.20.tar.gz"
cd "net-DNS-1.20"
perl Makefile.PL
make
make install
1
2
3
4
5
6
Last Updated: 6/23/2021, 9:36:08 PM