View Full Version : how do I upgrade a perl module?

01-24-2004, 06:47 AM
I was trying to upgrade spamassassin to a later version and got the following message:

Your version of ExtUtils::MakeMaker does not support PM_FILTER.
The "make" process will almost certainly have many warnings and it is
very likely to fail.

You can use either the CPAN shell or go to
to get an up-to-date version.

Perl 5.6.1 and later versions also include recent versions by default.

If I got the up-to-date version then what do I have to do to install it? (Like simple instructions please!)



01-24-2004, 07:48 AM
All this has kind of had me stumped a bit but I think I may have found some pages that well help clarify it. I think I have been trying to make it to complicated. I am still reading through these but wanted to pass them on to you.

This was my first stop and it mentioned this:

Installing a new module can be as simple as typing perl -MCPAN -e 'install Chocolate::Belgian'.
It also had the link below that I followed:
Here I found the following within the text:

You can use Andreas Koenig's CPAN module ( http://www.cpan.org/modules/by-module/CPAN ) to automate the following steps, from DECOMPRESS through INSTALL.
The link here lead me to this wich is simply a text file.

Like I said I am still reading through it but I think that even the first suggestion well work fine. Do check through the Apps that are in your SiteManager I think that one of them has to do with being able to use this. I can't remember the exacts on it and I think you want to check Development. If I learn more I well let you know

01-24-2004, 09:19 AM
I tried this:

perl -MCPAN -e 'install ExtUtils::MakeMaker'I got the following: Can't locate object method "install" via package "ExtUtils::MakeMaker" at -e line 1

Not sure what that means for sure. I know that this works on the account because I was able to use it to install another module:

perl -MCPAN -e 'install Graphics::ColorPicker'

That did install but did tell me:

There's a nes CPAN.pm version (v1.76) available!
[Current version is v1.63] You might want to try install Bundle::CPAN

I would suggest not doing that.... I tried it and it complained about missing preresqites and asked if I wanted to prepend and update so I said yes. It did it and then things went a bit south. It start asking me things I was not sure about. I did some guessing and got through it but not really sure what I did to my test account. NOTICE I SAY TEST ACCOUNT. It seems to be running fine but since I am exploreing not sure what I may have affected.

Just wanted to leave a trail of what I have done.

01-24-2004, 10:05 AM
Thanks wildjokerdesign.

While I was waiting for help I was looking around and I found the command (similiar to yours) perl -MCPAN -e shell

I entered that, went thru a bunch of responses, finally entered ExtUtils::MakeUser and it started to do the install but then failed on the "make install". I got the following message but did not know where to go from there.

Running make install
cp bin/instmodsh blib/script/instmodsh
/bin/perl "-Ilib" "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/instmodsh
Cannot forceunlink /usr/local/perl/lib/5.6.0/ExtUtils/Liblist.pm: Operation not permitted at /usr/local/perl/lib/5.6.0/File/Find.pm line 499
make: *** [pure_perl_install] Error 255
/bin/make install -- NOT OK


01-24-2004, 01:00 PM
It means that part of the Perl installation has been installed as root and you can't overwrite it.
Some of the Perl iinstallation on Westhost is installed as root, some of it as user...

01-26-2004, 02:47 PM
I think there was a thread on installing a whole separate Perl... I think.. that may have been SpamAssasin... I have been playing around with it but can't seem to get it to work. Then again this is all new. Wish we could get the ExtUtils::MakeUser install figured out because seems alot of things complain about it.

I found a couple of scripts on the net one that list all the modules installed called myserver.cgi. If I put it in a cgi-bin and run it it gives a bunch of enviromental stuff and a very long list of Modules. I don't think they are all installed although the script claims they are. I found a "bit" at CPAN for listing installed modules that I could not get to run in the cgi-bin. I uploaded it to root and SSH'd in and was able to run it. That only reaturns a list of around 15 installed modules... hmmm. Maybe someone well see something in all this that rings a bell.

01-26-2004, 04:50 PM
Well I admit I'm a bit of a novice concerning installing perl modules, but why do you have to install it at all? For instance I use the POP3Client module. In my code I simply stick it in a directory and then put a 'use' statement at the top. In your case I would create a directory called 'ExtUtils' in the same directory as your Perl program and in it place the MakeMaker module which I assume has the '.pm' suffix. So in your code you would put:

use ExtUtils::MakeMaker;

As far as I know the only difference between a module being istalled or not is Perl knows where to locate it ahead of time.


01-26-2004, 06:53 PM

Here is the steps I was running while trying to upgrade spamassassin.

$ mkdir src # if it doesn't exist
$ cd src
$ lynx www.spamassassin.org/downloads.html
$ # and download the latest file.
$ # After download
$ tar xzf Mail-SpamAssassin-2.60.tgz
$ cd Mail-SpamAssassin-2.60
$ perl Makefile.PL PREFIX=/sa SYSCONFDIR=/saconf
$ make
$ make install

I was getting the error message from the third step from the end:
$ perl Makefile...................

So can you give me the syntax that makes the statement look to one of my directories for MakeMaker? As you can see I am not using this in a perl program.


01-27-2004, 02:11 PM
Ok so we know you can't reinstall the system wide spam assassin, but according to the documentation at:


you can build a personal version. In the steps you took this line is wrong:

$ perl Makefile.PL PREFIX=/sa SYSCONFDIR=/saconf

You are telling the makefile that those two directories are accessed via the root of the filesystem which is not what you want. You want to access those under your home directory so in that case you would prefix the pathnames with a tilda like so:

$perl Makefile.PL PREFIX=~/sa SYSCONFDIR=~/saconf

That should get rid of the file permission problems.


PS I am so sick of this BB timing out my session.

01-27-2004, 02:18 PM
As far as SpamAssassin is concerned, the root directory is the home directory.
On Westhost we have two home directories. The home directory for processes that run .bashrc (login shells) and the home directory for those that don't run a login shell (such as sendmail and sshd for example).
The first of these has home set to '/home/username' or '~', and the second has it set to '/'.

In fact it won't make anydifference where you put the /sa and /saconf directories, the absolute paths are written into the spamassassin script installed at /sa/bin/spamassassin.
If you want to move them, you can change the paths there to whereever you want.
Similarly, the /sa/bin/spamassassin script can be installed anywhere, just the line in 'procmail.rc' that calls spamassassin will need to be adjusted to whereever you put it.