我的软件中心突然不工作了。当我尝试从启动器打开它时,它只是加载,但没有显示任何内容。
我尝试从终端运行它,但出现以下错误:
Traceback (most recent call last):
File "/usr/bin/software-center", line 36, in <module>
from softwarecenter.utils import (
File "/usr/share/software-center/softwarecenter/utils.py", line 19, in <module>
import dbus
File "/usr/lib/python2.7/dist-packages/dbus/__init__.py", line 103, in <module>
from dbus._dbus import Bus, SystemBus, SessionBus, StarterBus
File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 39, in <module>
from dbus.bus import BusConnection
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 39, in <module>
from dbus.connection import Connection
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 37, in <module>
from dbus.proxies import ProxyObject
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 34, in <module>
from dbus._expat_introspect_parser import process_introspection_data
File "/usr/lib/python2.7/dist-packages/dbus/_expat_introspect_parser.py", line 26, in <module>
from xml.parsers.expat import ParserCreate
File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
from xml.parsers.expat import ExpatError
File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt
Original exception was:
Traceback (most recent call last):
File "/usr/bin/software-center", line 36, in <module>
from softwarecenter.utils import (
File "/usr/share/software-center/softwarecenter/utils.py", line 19, in <module>
import dbus
File "/usr/lib/python2.7/dist-packages/dbus/__init__.py", line 103, in <module>
from dbus._dbus import Bus, SystemBus, SessionBus, StarterBus
File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 39, in <module>
from dbus.bus import BusConnection
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 39, in <module>
from dbus.connection import Connection
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 37, in <module>
from dbus.proxies import ProxyObject
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 34, in <module>
from dbus._expat_introspect_parser import process_introspection_data
File "/usr/lib/python2.7/dist-packages/dbus/_expat_introspect_parser.py", line 26, in <module>
from xml.parsers.expat import ParserCreate
File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt
如果我没记错的话,我没有用 Python 库做任何事情。我谷歌了一下,有人说要用apt-get update
& upgrade
。我试过了,但没有成功。
更新
我尝试重新安装python
并software-center
使用:
sudo apt-get install --reinstall python2.7
sudo apt-get install --reinstall software-center
但错误仍然存在
谢谢你的时间。
答案1
您的 LD_LIBRARY_PATH 或类似的东西可能有问题,可能需要用其他的(即,/usr/local
诸如 MATLAB 安装的库中的某些东西)替换正确的 libexpat.so。
这篇文章讨论了这个问题:http://ubuntuforums.org/showthread.php?t=2094005