前几天我试图在我的Debian系统上安装git。 instalation中止,从这一刻起,我每次得到一个locale错误,我尝试通过apt -…安装/
apt-get remove git Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: git 0 upgraded, 0 newly installed, 1 to remove and 75 not upgraded. 18 not fully installed or removed. After this operation, 0B of additional disk space will be used. Do you want to continue [Y/n]? y perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = "de_DE", LANG = "de_DE@euro" 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: Kann LC_ALL nicht auf die Standard-Lokale einstellen: Datei oder Verzeichnis nicht gefunden dpkg: error processing git (--remove): Package is in a very bad inconsistent state - you should reinstall it before attempting a removal. Errors were encountered while processing: git E: Sub-process /usr/bin/dpkg returned an error code (1)
我试图重新configuration语言环境,但我得到了同样的错误…我怎么能解决这个问题?
格尔茨
语言环境警告与git问题没有任何关系。 按照说明,你会想尝试apt-get install --reinstall git或aptitude reinstall git ,然后再次尝试删除它。 如果你在/ var / cache / apt / archives里有git包,你也可以尝试重新安装,比如dpkg -i /var/cache/apt/archives/git_....deb /var/cache/apt/archives/git dpkg -i /var/cache/apt/archives/git_....deb (确切的文件名会根据arch和版本的git)
18 not fully installed or removed.
你有18个包在中间状态,你应该先解决。 git问题有可能是由于这个原因造成的,很可能Perl对本地化的抱怨是由于这个原因导致的。 具体来说,Perl抱怨可能是由于locales包处于非function状态, dpkg --configure locales (而不是dpkg-reconfigure )或apt-get -f install将会修复。
运行apt-get -f install 。 如果这不能解决问题,请发布apt-get -f install的错误消息。
我最近有同样的问题,下面修复了语言环境警告
locale-gen en_US.UTF-8
将en_US.UTF-8更改为您要使用的任何语言环境! 恐怕我不能帮你解决这个问题。 :/也许你将能够重新安装后的语言环境是固定的(只是猜测)