![Perl 可能未配置?](https://linux22.com/image/976729/Perl%20%E5%8F%AF%E8%83%BD%E6%9C%AA%E9%85%8D%E7%BD%AE%EF%BC%9F.png)
你好,当我想安装、删除或配置我的包时出现错误,这是错误
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/local/apps/perl/lib/site_perl/5.20.0/x86_64-linux /usr/local/apps/perl/lib/site_perl/5.20.0 /usr/local/apps/perl/lib/5.20.0/x86_64-linux /usr/local/apps/perl/lib/5.20.0 .) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
Setting up debconf (1.5.51ubuntu2) ...
Can't locate Debconf/Db.pm in @INC (you may need to install the Debconf::Db module) (@INC contains: /usr/local/apps/perl/lib/site_perl/5.20.0/x86_64-linux /usr/local/apps/perl/lib/site_perl/5.20.0 /usr/local/apps/perl/lib/5.20.0/x86_64-linux /usr/local/apps/perl/lib/5.20.0 .) at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: error processing package debconf (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)
有人可以告诉我我该怎么办?
答案1
我通过从另一台 Ubuntu 机器复制内容来解决这个问题/usr/share/perl5
(/usr/share/perl
相同版本的操作系统 - 在我的情况下是 Ubuntu 20.04)
答案2
我会尽力 :
apt-file search Debconf/Db.pm
debconf: /usr/share/perl5/Debconf/Db.pm
所以也许
apt-get install debconf
对你来说很好
答案3
只需从目录中删除 perl 文件夹/usr/lib/x86_64-linux-gnu/perl
并运行 sudo apt-get install -f 命令。系统将尝试从其已维护的软件包列表中解压 perl 软件包,问题将得到解决。我在 18.04 上尝试过