Can't locate IO/Socket/ in @INC in Centos

I was working on Slowloris and while execution got a following error.

[[email protected] Downloads]$ ./ localhost Can't locate IO/Socket/ 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 ./ line 4. BEGIN failed--compilation aborted at ./ line 4. [[email protected] Downloads]$

If you are getting a similar error, you can fix it by installing Perl-IO-Socket-SSL in RHEL or CentOS operating system.

yum install perl-IO-Socket-SSL

If on CentOS 8 then you can use the following DNF command.

dnf install perl-IO-Socket-SSL

This has helped me I hope you too.