我使用以下方式安装了 MATE 桌面本手册但是现在我无法打开我的 Ubuntu 软件中心,也无法从更新管理器打开设置。
我删除了 mate 桌面但问题并没有解决,我还重新安装了软件中心、software-properties-gtk 和 software-properties-common 使用方法:
sudo apt-get update; sudo apt-get --purge --reinstall install software-center software-properties-common software-properties-gtk
。
但是当使用此行时我收到以下错误:
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/735 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 304824 files and directories currently installed.)
Preparing to replace software-center 5.0.2 (using .../software-center_5.0.2_all.deb) ...
Unpacking replacement software-center ...
Preparing to replace software-properties-common 0.81.13.1 (using .../software-properties-common_0.81.13.1_all.deb) ...
Unpacking replacement software-properties-common ...
Preparing to replace software-properties-gtk 0.81.13.1 (using .../software-properties-gtk_0.81.13.1_all.deb) ...
Unpacking replacement software-properties-gtk ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Unknown media type in type 'interface/x-winamp-skin'
Setting up software-center (5.0.2) ...
Traceback (most recent call last):
File "/usr/sbin/update-software-center", line 38, in <module>
from softwarecenter.db.update import rebuild_database
File "/usr/share/software-center/softwarecenter/db/update.py", line 59, in <module>
from softwarecenter.db.database import parse_axi_values_file
File "/usr/share/software-center/softwarecenter/db/database.py", line 26, 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 LinuxMint
Setting up software-properties-common (0.81.13.1) ...
Setting up software-properties-gtk (0.81.13.1) ...
$
有没有办法解决这个问题,而不必重新安装 Ubuntu 11.10?
提前感谢 tinuz
答案1
我在使用软件中心和其他一些应用程序时也遇到了同样的问题。不过,你不需要重新安装,尽管这可能为时已晚。以下是它不起作用的原因:
lsb_release -a
印刷:
Distributor ID: LinuxMint
Description: Linux Mint 12 Fluxbox
Release: 12
Codename: lisa
可以通过以下步骤纠正以保留 Mint-Mate:
gksu gedit /etc/*release
并将 gedit 文件中的所有内容更改为:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=Oneric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
然后运行:
gksu gedit /etc/*issue
并更改为:
Ubuntu 11.10 \n \l
对我来说效果很好,虽然 Mate 似乎有点粗糙,但因为我纯粹是在 VBox 中测试 Oneric,所以没关系
答案2
将我的评论转换为答案
此升级过程与Natty中Gnome 3 PPA的使用类似。
此次升级涉及300Mb+软件库的升级——这确实是一个单向过程。
您可以在现有安装的基础上进行安装(从而保留现有的 /home 文件夹) - 但您需要重新安装所有其他应用程序。
首先使用 clonezilla/partimage 之类的工具进行备份。
答案3
我尝试重置 lsb-release 和 *issue,但不知为何,它们总是恢复到 linux mint。我不确定它们是在每次重启时重置,还是在每次更新时重置,但它们确实经常重置。
我编写了一个小脚本,不时手动运行它:
#!/bin/sh
echo "Restoring /etc/lsb-release ..." && \
echo "DISTRIB_ID=Ubuntu" > /etc/lsb-release && \
echo "DISTRIB_RELEASE=11.10" >> /etc/lsb-release && \
echo "DISTRIB_CODENAME=oneiric" >> /etc/lsb-release && \
echo "DISTRIB_DESCRIPTION=Ubuntu 11.10" >> /etc/lsb-release && \
echo "Restoring /etc/*issue ..." && \
echo "Ubuntu 11.10 \\n \\l" > /etc/*issue && \
echo "Done."
另存为(例如)修复ubuntu.sh并设置其执行权限(chmod 755 fixubuntu.sh)并以 root 身份执行(sudo ./fixrelease.sh) 每次你想要恢复你的 ubuntu 发布信息时。
当然,您可能希望在每次启动时自动运行该脚本。只需确保以 root 身份运行即可。