Wednesday, September 9, 2015

Fixing "debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC" errors

Every once in a while I run into this error after installing multiple versions of perl on a Linux system, for example when trying to install a new package:
root@foo # sudo apt-get install linux-crashdump
Reading package lists... Done
Building dependency tree      
Reading state information... Done
linux-crashdump is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 152 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC (you may need to install the Debconf::Log module) (@INC contains: /usr/[...] .) at (eval 1) 

Simplest way to fix this is to move the symbolic link /usr/bin/perl to the original perl binary installed in the system. In this case:
root@foo # rm /usr/bin/perl
root@foo # ln -s /usr/bin/perl5.18.2 /usr/bin/perl

No comments:

Post a Comment