Can’t locate Test/ 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/ 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/ line 72.
BEGIN failed--compilation aborted at .././test/ 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/ 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/“, then quickly jump to this article to view the solution.

Was this article helpful?

Related Articles

Comments Leave a Comment

Leave a Comment