当我尝试运行QGIS时,在启动时会发现以下错误:
An error occured during execution of following code:
import pyplugin_installer
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named pyplugin_installer
Python version:
2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010]
QGIS version:
2.12.1-Lyon 'Lyon', exported
Python path:
['/usr/share/qgis/python', u'/home/jesse/.qgis2/python', u'/home/jesse/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/jesse/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk2', u'/home/jesse/.qgis2//python']
##################################
An error occured during execution of following code:
pyplugin_installer.initPluginInstaller()
Traceback (most recent call last):
File "", line 1, in
NameError: name 'pyplugin_installer' is not defined
Python version:
2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010]
QGIS version:
2.12.1-Lyon 'Lyon', exported
Python path:
['/usr/share/qgis/python', u'/home/jesse/.qgis2/python', u'/home/jesse/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/jesse/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk2', u'/home/jesse/.qgis2//python']此后,QGIS启动。然后,当我尝试打开Python控制台或插件菜单时,会收到类似的错误消息。
我尝试过apt-get purge qgis,然后用apt-get install qgis -f重新安装它。但是,在试图清除/安装时,我会收到以下错误消息:
Processing triggers for man-db (2.7.4-1) ...
Setting up qgis-providers-common (1:2.12.1+git20151211+80c5cb6+23wily) ...
cp: cannot stat ‘/usr/share/qgis/resources/srs-template.db’: No such file or directory
dpkg: error processing package qgis-providers-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of qgis-providers:
qgis-providers depends on qgis-providers-common (= 1:2.12.1+git20151211+80c5cb6+23wily); however:
Package qgis-providers-common is not configured yet.
dpkg: error processing package qgis-providers (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
qgis-providers-common
qgis-providers
E: Sub-process /usr/bin/dpkg returned an error code (1)显然,这个问题似乎与Python有关,但我不知道如何诊断这里的错误。有没有人对如何解决这一问题有任何想法,或者对其他地方有什么想法来寻找关于正在发生的事情的线索?谢谢。
发布于 2015-12-16 15:18:43
我也有同样的问题,但现在又起作用了。
我在今天安装的这个更新中修正了这个问题:
http://hub.qgis.org/issues/13981
https://askubuntu.com/questions/708979
复制相似问题