安装 Ubuntu 提示的部分升级后,我无法打开终端或软件中心。
在 UXTERM 中,当我输入 gnome-terminal 时,我得到的输出如下:
(process:10308): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8
在 UXTERM 中,当我输入 software-center 时,我得到的输出如下:
(process:23592): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
ERROR:root:DebFileApplication import
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/db/__init__.py", line 4, in <module>
from debfile import DebFileApplication, DebFileOpenError
File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in <module>
from softwarecenter.db.application import Application, AppDetails
File "/usr/share/software-center/softwarecenter/db/application.py", line 28, in <module>
import softwarecenter.distro
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 199, in <module>
distro_instance = _get_distro()
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 174, in _get_distro
module = __import__(distro_module_name, globals(), locals(), [], -1)
ImportError: No module named kali
Traceback (most recent call last):
File "/usr/bin/software-center", line 128, in <module>
from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3
File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 54, in <module>
from softwarecenter.db.application import Application
File "/usr/share/software-center/softwarecenter/db/application.py", line 28, in <module>
import softwarecenter.distro
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 199, in <module>
distro_instance = _get_distro()
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 174, in _get_distro
module = __import__(distro_module_name, globals(), locals(), [], -1)
经过搜索,我发现这可能是由于语言环境问题。在 UXTERM 中,当我输入 时locale
,我得到的输出如下:
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
LANG=en_IN
LANGUAGE=en_IN:en
LC_CTYPE="en_IN"
LC_NUMERIC="en_IN"
LC_TIME="en_IN"
LC_COLLATE="en_IN"
LC_MONETARY="en_IN"
LC_MESSAGES="en_IN"
LC_PAPER="en_IN"
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT="en_IN"
LC_IDENTIFICATION="en_IN"
LC_ALL=
现在当我尝试修复它时,它却uxterm
打不开。当我尝试打开它时,它显示:
uxterm tried unsuccessfully to use locale en_IN.UTF-8 by setting $LANG to "en_IN.UTF-8".
我该如何解决这个问题?
答案1
您的语言环境似乎已损坏,需要重新生成。我建议您打开控制台窗口 (Ctrl+Alt+F1) 并登录。然后尝试通过运行重新生成所有语言环境
sudo locale-gen --purge