in reply to Install Net::SSLeay on Ubuntu server

You are mixing your OS package manager and your Perl installation. This will mainly lead to tears and a broken OS installation.

The installation error you get from cpan likely means that libz resp. the libz-devel zlib-devel package is not installed.