![终端或软件中心未安装任何软件 dpkg passwd 错误并返回 1](https://linux22.com/image/876305/%E7%BB%88%E7%AB%AF%E6%88%96%E8%BD%AF%E4%BB%B6%E4%B8%AD%E5%BF%83%E6%9C%AA%E5%AE%89%E8%A3%85%E4%BB%BB%E4%BD%95%E8%BD%AF%E4%BB%B6%20dpkg%20passwd%20%E9%94%99%E8%AF%AF%E5%B9%B6%E8%BF%94%E5%9B%9E%201.png)
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 安装软件中心
过去,当应用程序抛出错误时,这种方法对我来说很有效,但我不知道问题背后的全部原因,因为系统详细信息未列出......尽管它们可能不需要。
当我重新阅读错误时,看起来包已损坏或执行的命令有语法错误,所以如果这不起作用,请清除包缓存并尝试再次安装它,仔细检查命令的语法。