Ignoring the fact that the first thing you did after running cpan was to install cpan, go back and read what I wrote :) If you run out of RAM expect daft things to happen. Use the OS package management to install things, you don't need to everything yourself. sudo apt install libhttp-server-simple-perl You're wasting time compiling on a low end/embedded system. apt isn't cpan, so don't expect packages to be the same as they do on cpan, which is probably why your apt-get install cpanm "didn't work" (this isn't a report anyone can help you with constructively :), sudo apt install cpanminus or something similar. Also The documentation often has hints and tips for installation.
Update: fixed autocorrect based typo.