In this article, we will explain how to check if Perl module is installed or not.
- You can run the following command from the shell to check whether a particular Perl module is installed on the server or not:
perl -e “use Themodulename::Here”
For Example: Let us test if Zlib is installed or not “A core Perl module installed by default on all systems”
[root@carbondev ~]# perl -e “use Compress::Zlib”
[root@carbondev ~]# - You will get the output look like above, showing no errors in calling a user function.
- If there is no module installed, however you will get something like below output:
[root@carbondev ~]# perl -e “use Soap::Lite”
Can’t locate Soap/Lite.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at -e line 1.
BEGIN failed–compilation aborted at -e line 1.
In this way, a Perl module’s installation status can be verified. For help get in touch with our support team.
Related Articles
How to monitor active connections and network usage on your VPSApril 20, 2024
How to monitor incoming and outgoing network connections in Linux serversApril 19, 2024
How to set the possession of an unowned DNS ZoneApril 17, 2024
How to fix “There Has Been a Critical Error on This Website” issueApril 15, 2024