昨天在ubuntu安装了“Python webqq客户端”程序。结果今天更新了系统。重启后发现ubuntu软件中心打不开,在网上找到以下解决方案。
初步判断是安装webqq客户端时添加了linuxdeepin的软件源。
gongstring@chz-desktop:~$ software-center
Traceback (most recent call last):
File '/usr/bin/software-center', line 149, in module
from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3
File '/usr/share/software-center/softwarecenter/ui/gtk3/app.py', line 49, in module
from softwarecenter.db.application import Application
File '/usr/share/software-center/softwarecenter/db/application.py', line 25, in module
from softwarecenter.backend.channel import is_channel_available
File '/usr/share/software-center/softwarecenter/backend/channel.py', line 25, in module
from softwarecenter.distro import get_distro
File '/usr/share/software-center/softwarecenter/distro/__init__.py', line 165, in module
distro_instance=_get_distro()
File '/usr/share/software-center/softwarecenter/distro/__init__.py', line 148, in _get_distro
module=__import__(distro_id, globals(), locals(), [], -1)
ImportError: No module named LinuxDeepin
解决方案如下:
sudo gedit /etc/lsb-release(好吧,我不会维姆。-!)
以下文取代该案文:
DISTRIB _ ID=UbuntuDISTRIB _ RELEASE=11.10 DISTRIB _ CODENAME=oneiricDISTRIB _ DESCRIPTION=" Ubuntu 11.10 "
好了,这时候你应该可以打开软件源码和软件中心了。
但是,还有一个问题。软件中心是打开的,但是页面一直处于空白刷新界面。
卸载和重装:
sudo apt-get autoremove software-center --purge
显示:
Rmdir:无法删除“/var/cache/software-center/xapian/”:没有这样的文件或目录。dpkg:处理软件中心(-purge)时出错:删除后脚本已安装在子进程中,返回错误号1。
Error occurred during processing: software center: subprocess /usr/bin/dpkg returned error code (1) looked it up,
缓存文件夹下没有软件中心文件。
sudo mkdir/var/cache/software-center sudo mkdir/var/cache/software-center/xapiansudo apt-get自动删除软件-center-purge sudo apt-get安装软件-center一切正常。