在我的 ubuntu 15.04 服务器上,apt-get 命令不起作用。我认为这与 perl 有关。有人知道如何修复它吗?我已经尝试过 apt-get -f install,但它输出相同的错误。
谢谢你的协助
这是我收到的错误:
root@xxx:~# apt-get install lynx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libncurses5 libncursesw5 libtinfo5 lynx-cur
The following NEW packages will be installed:
lynx lynx-cur
The following packages will be upgraded:
libncurses5 libncursesw5 libtinfo5
3 upgraded, 2 newly installed, 0 to remove and 568 not upgraded.
4 not fully installed or removed.
Need to get 0 B/2426 kB of archives.
After this operation, 5731 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
libtinfo5 libncursesw5 libncurses5 lynx-cur lynx
Install these packages without verification? [y/N] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)