http://www.perlmonks.org?node_id=829482


in reply to Building a Development Environment on Ubuntu

I second duelafn's recommendation to use a single partition, except maybe a separate /boot is useful. Newbies aren't likely to be able to judge proper sizes for partitions and it's not exactly trivial to resize partitions and filesystems the first time you find yourself with a full partition. It's not that hard to repartition, but your meditation is pretty clearly aimed at newcomers.

A minor nit is that the traditional (and recommended) place for software that is not part of the distribution is either /usr/local or /opt The advantage of using /usr/local is that perl installs there by default so you can just hit return all the way through the configuration script. Myself, I like /opt/perl since I'm exporting /opt via NFS anyhow.

One trick is to modify your PATH for your user but NOT for root. I add the following to the end of my user account's .bash_profile

PATH=/opt/perl/bin:~/bin:"${PATH}" export PATH
and I "magically" see my installed perl when I just type perl -E but I haven't messed with root's access to the system perl. Another advantage is that when I (as my user account) use cpanp there's no confusion about trashing the system perl by mistake.

I don't recall any problems configuring cpanp as my user. I believe I had to add sudo to the make install command and maybe to the build command, but I'm pretty sure cpanp knows where it's perl is installed by default.

One issue newbies can run into when building modules is that most Linux distros do not include the header files for installed software. The package you want will have a -dev at the end. For example, if you want to use GD then you'll need to install libgd2-xpm and libgd2-xpm-dev (or the noxpm equivalents) to compile the XS. (GD maybe be a bad example but I believe GD requires the headers.) Anyhow, -dev isn't too hard to figure out, but for a novice monk it might help to avoid the "I've got libgd2 installed but I can't install GD?" syndrome.

I suppose I'm showing my long gray beard here but I kind of miss the simple days when we routinely built our own versions of apache, perl, and mod_perl. Sure you had to understand ./Configure && make && make test && make install but you didn't have to do backflips to not mangle your systems. Sure, you can still do that today but it's practically a forgotten art anymore.

Now get off my porch ya darn youngin! ;^)