I wanted to install the Perl scripts for o2sms on my new webfaction account and ran into a problem. I’ve not got root so the cpan install was going to complain when it tried to install to the default directory /usr/bin. I needed to figure out how to install o2sms and the associated modules (Crypt:SSLeay, XML::Parser etc.) as a non-root user.
I started off downloading modules and running through a manual install with perl Makefile.PL PREFIX=/home/sneely/perl; make; make test; make install but that turned out to be too slow. So I figured out the fast way with cpan:
- set PERL5LIB and PERLLIB environmental variables to point at ~/perl/lib (or where ever you’re going to put your libraries — I needed to add site_perl/lib too
- run the cpan installer. The cpan executable wasn’t available so I ran perl -MCPAN -e shell
- follow the instructions to configure cpan (pretty much accept all the defaults)
- add ~/perl/bin to your PATH
- run cpan and install Bundle::CPAN WWW::SMS::IE::iesms
That was pretty much it. I had to run cpan a couple of times to update and install things like Crypt:SSLeay but now o2sms is up and running fine.
Of course later I find a page with more details on install perl modules as a non-root user.