我在 apt-get 中遇到了依赖项错误

我在 apt-get 中遇到了依赖项错误

每当我尝试安装任何包时都会收到以下代码:

此外,如果我还尝试修复依赖关系,它也会出现错误。

我已经尝试使用 aptitude 安装语言环境,也尝试编辑 /etc/environment 来添加语言环境变量

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 bluez-cups : Depends: cups but it is not going to be installed
 hplip : Depends: cups (>= 1.1.20) but it is not going to be installed
 libc6 : Breaks: locales (< 2.24) but 2.13+git20120306-12.1 is to be installed
 printer-driver-gutenprint : Depends: cups (>= 1.3.0) but it is not going to be installed
 printer-driver-hpcups : Depends: cups (>= 1.4.0) but it is not going to be installed or
                                  cupsddk but it is not installable
                         Depends: cups but it is not going to be installed
 printer-driver-splix : Depends: cups (>= 1.5.0-3~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
himanshu@himanshu-HP:~$ sudo apt-get -f install        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  bluez-cups hplip printer-driver-gutenprint printer-driver-hpcups
  printer-driver-postscript-hp printer-driver-splix ubuntu-minimal
0 upgraded, 0 newly installed, 7 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 4443 kB disk space will be freed.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LC_TIME = "en_IN.UTF-8",
    LC_MONETARY = "en_IN.UTF-8",
    LC_ADDRESS = "en_IN.UTF-8",
    LC_TELEPHONE = "en_IN.UTF-8",
    LC_NAME = "en_IN.UTF-8",
    LC_MEASUREMENT = "en_IN.UTF-8",
    LC_IDENTIFICATION = "en_IN.UTF-8",
    LC_NUMERIC = "en_IN.UTF-8",
    LC_PAPER = "en_IN.UTF-8",
    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)

我在使用 dpkg 时也遇到了错误。

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

安装 katoolin 的工具后,可以看到这些

locale -a 的输出为:

himanshu@himanshu-HP:~$ locale -a
The program 'locale' is currently not installed. You can install it by typing:
sudo apt-get install libc-bin

由于软件包损坏,即使使用 aptitude,我也无法安装任何软件包

相关内容