Recently, I installed the sendemail program on my Ubuntu server. When I tried to send an email over SMTP, I encountered an error that Net::SSLeay and IO::Socket::SSL Perl modules are missing on system.
To resolve this issue, I needed to install the Net::SSLeay and IO::Socket::SSL Perl modules on my Ubuntu 22.04 server. Here’s how you can do it:
Advertisement
- Update the package list:
sudo apt update
- Install the required dependencies:
sudo apt install libssl-dev
- Install Net::SSLeay and IO::Socket::SSL using CPAN:
sudo apt install cpanminus
sudo cpanm Net::SSLeay IO::Socket::SSL
Alternatively, you can use the system’s package manager to install these modules if available:
- Install libio-socket-ssl-perl (which includes both Net::SSLeay and IO::Socket::SSL):
sudo apt install libio-socket-ssl-perl
After installing these modules, the sendemail program should be able to send emails over SMTP without encountering the SSL error.