终端或软件中心未安装任何软件 dpkg passwd 错误并返回 1

终端或软件中心未安装任何软件 dpkg passwd 错误并返回 1
installArchives() failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up passwd (1:4.1.5.1-1ubuntu9.1) ...
dpkg: error processing package passwd (--configure):
 cannot compute MD5 hash for file '/etc/init/passwd.conf': failed to read (Input/output error)
Errors were encountered while processing:
 passwd
Error in function: 
Setting up passwd (1:4.1.5.1-1ubuntu9.1) ...
dpkg: error processing package passwd (--configure):
 cannot compute MD5 hash for file '/etc/init/passwd.conf': failed to read (Input/output error)
dpkg returned error 1

答案1

我不完全明白完整的错误是什么,但看起来一些设置已损坏。我建议您从终端运行以下命令:

  • sudo apt-get 删除软件中心
  • sudo apt-get purge 软件中心
  • sudo apt-get 更新
  • sudo apt-get 安装软件中心

过去,当应用程序抛出错误时,这种方法对我来说很有效,但我不知道问题背后的全部原因,因为系统详细信息未列出......尽管它们可能不需要。

当我重新阅读错误时,看起来包已损坏或执行的命令有语法错误,所以如果这不起作用,请清除包缓存并尝试再次安装它,仔细检查命令的语法。

相关内容