How to install Perl modules on shared servers
- Category : cPanel Question
- Posted on : Sep 14, 2020
- Views : 1,161
- By : HostSEO
A Perl module is a discrete component of software for the Perl programming language. Perl is supported on all of our Shared/Reseller servers and the Perl Modules menu is available with Stellar Plus and Stellar Business. However, when you try to install a Perl module in the cPanel >> the Perl modules menu, you will face this error:
Most Perl modules are written in Perl, some use XS (they are written in C) so they require a C compiler. Please note that the C compiler is disabled on all of our shared servers as it is a high security threat. However, you can contact our Support Team and we will enable it for you for 3 hours.
Still, it is possible to install any Perl module via the command line without C compiler enabled. You can do it using the SSH connection, the guide on how to access your account via SSH can be found here.
We will use the cpan command to install Perl modules. You can find the full list of available CPAN modules in the official documentation.
1. After opening the command console, you need to type cpan. This way, you will access the cpan console:
2. The syntax is the following:
install module::name
For example, we will install the Date::Calc Perl module:
3. Most likely, you will see this error message at the end:
Cpan is configured to provide one setting to Makefile.PL, and Makefile.PL is picking up a conflicting setting from the environment.
Cpan Prefix is pre-configured as PREFIX=/home/USER/perl/usr
However, our servers’ environment is configured to use /home/USER/perl5
As such, simply tell cpan to stop specifying PREFIX. From within the cpan shell, run these commands:
o conf makepl_arg ''
o conf mbuildpl_arg ''
o conf commit
o conf make_arg ''
o conf commit
4. Now feel free to run install module::name once again. In case you see an error like below, you need to delete the previous failed build and try again:
In our example, the error shows directory /home/nctests/.cpan/build/Date-Calc-6.4-hsg6j9
You can access it via the cPanel File Manager or using an FTP client and delete it:
5. This is a successful installation log:
Modules may have dependencies on other modules (almost always on CPAN) and cannot be installed without them (or without a specific version of them).
Sometimes, the installation will ask to install a module (or a few ones), which has/have a dependence.
6. After the installation do not forget to type exit in the cpan console to close it and remove the lock file:
Otherwise, you may see this message after attempting to open it again:
After Shall I try to run in downgraded mode? (Y/n), type n and follow the instructions. You need to kill a running cpan process and remote the lock file manually:
7. Finally, you can open the Perl Modules option in cPanel and check for a new installed module.
PLEASE NOTE: In order for the newly installed module to work correctly, the following lines should be added at the top of your script:
#!/usr/bin/perl
use cPanelUserConfig;
or
#!/usr/bin/perlml
The users of Stellar Plus and Stellar Business hosting packages can find these two options in the Perl Modules menu:
We hope that this article will help you installing Perl modules on our servers.
That's it!
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu