我是Ubuntu的新手,我想在Ubuntu 13.10上运行update-manager。我得到:
jacopo@jacopo-laptop:~$ update-manager
Traceback (most recent call last):
File "/usr/bin/update-manager", line 28, in <module>
from gi.repository import Gtk
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module> from ._gi import _API
ImportError: No module named 'gi._gi'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
import apt_pkg
ImportError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/update-manager", line 28, in <module>
from gi.repository import Gtk
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module>
from ._gi import _API
ImportError: No module named 'gi._gi'
据我了解,这是一个与我应该安装python3.4的事实有关的问题。我将其安装在中/usr/local/lib
,但总是收到相同的错误。这样,我什至无法升级到Ubuntu 14.04。
sudo apt install --reinstall <package-name>
,因为这样可以避免计算和删除依赖项(并标记要删除的软件包)。请注意,删除软件包并不总是可逆的过程。例如,如果要求,APT将删除自身或它的依赖项!--reinstall
因此,该标志比remove
其后要安全得多install
。该remove
命令本身不会删除程序包的配置文件,因此不会带来任何好处install --reinstall
。