1. Home
  2. Linux
  3. Can’t locate Test/Harness.pm perl Error: [Solution]

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

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


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

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

That’s it 🙂


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

Updated on November 7, 2017

Was this article helpful?

Related Articles

Leave a Comment