[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SLUG] Perl configured, but Apt tells me it's not.



Been there before.  Debian's routing failure to keep anything like up to
date with perl versions is my only serious gripe with Debian.  As you're
discovering, trying to get Debian to work with a later version of perl can
be rather trying.

In the past I've installed (from source) a more recent verison of perl
than what Debian used.  The problems with apt-get et. al. can be dealt
with by making sure that you're newly installed perl knows to look in the
directories where debian's stuff is installed.  You should probably do
that as part of compiling perl, but you can often get by with using the
PERL5LIB environment variable.  Problem is that PERL5LIB puts directories
at the head of the list of places to search where you really want them at
the tail of the list so they act as a fallback for stuff where newer
versions are not found.  So it's better to get it right when compiling
perl.

You'll also find that there's an ongoing issue due to debian installing
libraries for the old perl.  OFten it makes no difference (so long as perl
searches the old library directories), but where there are binary
components, you will need to install the perl modules yourself from CPAN.






On Sun, 24 Aug 2003, Adam Bogacki wrote:

> Hi,
>
> 	I'm running in console mode, with 'apt-get update' & Mutt
> functional, after mucking up a file transfer between partitions.
>
> 'Tux:~# apt-get install -f -u dist-upgrade --fix-broken'
>
> aborted with
> "Debconf: Perl may be unconfigured. Can't locate strict.pm in @INC ..."

Looks like whichever perl you are running is not finding its library
directories.  strict is part of the base perl libraries, and if you're not
finding it then most of perl's functionality is probably failing.

`perl -V` should show you where perl is looking for its libraries.  Check
that the libraries are actually where perl thinks they should be.


> I managed to get Lynx working by moving a missing file into its correct
> place and downloaded and configured Perl 5.8.0 from www.cpan.org
> following
> the instructions in /home. The only thing I did not do was 'make
> distclean' & 'make realclean' as I had not built Perl before.
>
> However, when I now try
>
> 'Tux:~# apt-get install -f -u dist-upgrade --fix-broken'
>
> I get "Perl may be unconfigured, can't locate Debconf/Log.pm in @INC
> (@INC contains /usr/local/lib/perl5/5.8.0)."

@INC needs to contain a good deal more than that.  Usually there's 5 or 6
directories.


> ... but I find
>
> ./usr/perl5/Debconf/Log.pm where I inspected it via vi !

right so '/usr/perl5' needs to be one of the entries in @INC.  Preferably
about the end of the list.

Take a look in your /usr/bin and /usr/local/bin directories, and you'll
probably find a few versions of perl.  eg you might find
/usr/bin/perl5.6.0 which debian installed, and /usr/local/bin/perl5.8.0 if
you installed 5.8.0 from source and didn't tell it to put perl somewhere
else.

run perl<version> -V for each of these and see where debian's perl is
looking for libraries.  You'll probably have to re-compile perl5.8.0 and
tell it to add all of these to the list of directories to search for
libraries.

> How do I get
>
> 'Tux:~# apt-get install -f -u dist-upgrade --fix-broken'
>
> to work in order to get the system  working again ?

You might be able to just change the #! line in the script to use the old
perl. eg:

#!/usr/bin/perl5.6.0

Andrew McNaughton



--

No added Sugar.  Not tested on animals.  May contain traces of Nuts.  If
irritation occurs, discontinue use.

-------------------------------------------------------------------
Andrew McNaughton           In Sydney
                            Working on a Product Recommender System
andrew@scoop.co.nz
Mobile: +61 422 753 792     http://staff.scoop.co.nz/andrew/cv.doc





Reply to: