Can’t locate Test/Harness.pm perl Error: [Solution]

Updated on November 7, 2017

Do you get the below Perl error while installing/Upgrading OpenSSL to the latest version?

Can't locate Test/Harness.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 .) at .././test/run_tests.pl line 72.
BEGIN failed--compilation aborted at .././test/run_tests.pl line 72.
make[1]: *** [_tests] Error 2
make[1]: Leaving directory `/root/openssl-1.1.0f'
make: *** [tests] Error 2

I got this error on CentOS 6.9 with Perl version 5.10.1. If you are getting the same error, then here’s how you can solve it.

How to fix Can’t locate Test/Harness.pm perl Error

The error indicates that the perl module Test::Harness is not installed.

Install it using yum as follows:

 yum install perl-Test-Harness

or

Using perl CPAN is the safe way to install any perl module.

perl -MCPAN -e 'install Test::Harness'

That’s it 🙂

Wait!

If you are get an error “Can’t locate Module/Load/Conditional.pm“, then quickly jump to this article to view the solution.

Was this article helpful?

Related Articles

Comments Leave a Comment

Leave a Comment