Sunday, 30 May, 2004

Installing POPFile on SuSE Linux

Today's Linux experiment was frustrating, but ultimately fruitful.  I've been wanting to convert my day-to-day work to Linux, and I've chosen SuSE Linux 9.1 as the particular distribution.  I installed the Evolution email client the other day, and have been using it since.  I haven't converted my address book yet, which is something of an inconvenience, but I'll manage.  Today's experiment was installing the POPFile spam filter, which I've been using on Windows since last fall.  This turned out to be very difficult.

I downloaded the cross platform version of POPFile to my home directory, extracted the files, and tried to run the program.  The Perl interpreter failed with the message "Can't locate HTML/Tagset.pm."  It seems that the SuSE install didn't include all of the necessary Perl modules.  So I started up SuSE's setup program, YAST, located the module, and installed it.  Try number two got a little further before exiting with the error message "Can't locate DBI.pm," which turns out to be the Perl database interface.

I've had this problem before:  trying to get all of the necessary Perl modules installed.  Figuring that these things have to be listed somewhere, I took another look at the documentation that came with POPFile.  Their installation instructions for the cross platform version say:

Get Perl running on your machine, then download the POPFile Perl zip from the POPFile Home Page, and extract it to a directory of your choice.

Not very helpful, as Perl is indeed running on my machine.  Checking the Web site, I finally found the list of required modules in their HowTo section here.  I installed the DBI module from my SuSE DVD, but was unable to find the SQLite module there so I figured I'd get it from CPAN like the instructions say.  I was able to download and extract the files, but the build failed.  Why?  Because the SuSE installation didn't include make, gcc, and other utilities required for building programs!  Granted, I didn't tell it to install development tools, but considering how much Linux software is distributed in source form with make file installations, it seems reasonable to expect the default install to include a minimum set of build tools.  So, back to YAST and installation of some development tools.  After all that, the CPAN install failed again for reasons unknown, but since it left the downloaded files in my root directory I was able to manually execute make and install the program.

Did you know that you must have root permissions to run POPFile?  Many Linux systems restrict access to ports lower than 1024, and the standard POP port is 110.  Fortunately, POPFile gives a nice error message about that one and I had no trouble making POPFile run as root.  This, too, is not mentioned in the POPFile documentation.  It is, however, mentioned in the FAQ.

All told, installing POPFile on my system took about 4 hours of real work (including researching and head-scratching) spread out over an 8 hour period.  I realize that an experienced Linux head would have figured all this stuff out a lot quicker, and I expect that the next thing I try to install will go much quicker.  Still, I'm a reasonably bright guy who's been using computers for 25 years.   I have some idea of what's going on.  Imagine the problems a casual computer user would have with this stuff.  I'd be willing to bet that most would give the program a try, see it fail, and give up.  More tomorrow after I've sorted out my thoughts on this one.