Re: Perl problems with Slack 11 root wrote:
> I have been unable to get anything from my old perl programs
> to run under 5.8.8. So I ripped out everything to start from
> scratch. Running one of my old perl programs I get:
>
> Can't locate Config/IniFiles.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i486-linux
> /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i486-linux /usr/lib/perl5/site_perl/5.8.8
> /usr/lib/perl5/site_perl .)
>
> But when I try to fetch the package:
> cpan[1]> install Config::IniFiles
> CPAN: Storable loaded ok
> Going to read /root/.cpan/Metadata
> Database was generated on Wed, 01 Nov 2006 02:23:19 GMT
> Config::IniFiles is up to date (2.38).
If you installed Config::IniFiles from CPAN on Slackware 10.2
if will probably be installed somewhere under
/usr/lib/perl5/site_perl/5.8.7/
And the @INC array contains only paths with a 5.8.8 component.
Adjusting that array might solve your problem.
No, I don't know how to do that.
>
> Perl can see it, why can't my script?
Seems like CPAN looks at more places than just @INC.
>
> At the top of the script I have #!/usr/bin/perl which points to
> perl5.8.8.
There is probably an other complication.
I installed SpamAssassin from CPAN with some required or optional
packages. Look at this:
kees@pcict9:~$ head -n 1 `which spamassassin sa-learn sa-update`
==> /usr/bin/spamassassin <==
#!/usr/bin/perl5.8.7 -T -w
==> /usr/bin/sa-learn <==
#!/usr/bin/perl5.8.7 -T -w
==> /usr/bin/sa-update <==
#!/usr/bin/perl5.8.7 -T -w
This will certainly bring troubles if the perl version changes.
And CPAN will just say ".... is up to date (version)." if you try
to reinstall the packages.
I only have SpamAssassin with a few additional packages installed
from CPAN. The last two times I upgraded perl I solved this problem
with brute force.
Something like:
-- Do a normal slakware upgrade.
-- Search for all directories with 'perl' in their names and
recursively delete all directories you find.
-- Go to /var/log/packages and do 'grep -l perl *`
-- Reinstall all packages found during the precious step.
-- Reinstall SpamAssassin and friends from CPAN.
Yes, I already said it was brute force.
And ... erm ..., yes. I _do_ shame. .... A lot even.
But it _did_ cleanup my perl environment.
My switch to Slack 11 will be on a new computer, one of these days.
So this time I won't need brute force.
There should be a better way. But I couldn't find it when needed.
Lately I found something about a 'autobundle' perl package that sould
make it possible to create a single bundle of all installed perl
packages and reinstall/update that bundle at once.
I didn't use it and don't know the details yet.
Regards,
Kees.
--
Kees Theunissen. |