in reply to cpan modules not installing

Without knowing any of the specifics, I can only guess. You can help us help you better by showing how you install modules, and by telling us which cpan tool you're using to install modules and which Perl you invoke to run your script, and how things fail.

If you're using the system Perl, install modules through the Ubuntu package manager. If you're using your own Perl, most likely the cpan tool uses the system Perl instead of your own, or the script you're invoking is run with the other Perl.