Howdy,
The error that you’re receiving above is that gcc is missing… it may just be a matter of installing the gcc package, and then re-attempt installing the Perl packages. The commands you mentioned do that, along with installing some related packages.
-Eric