Ubuntu 16.04 -ImportError:没有名为“UbuntuDrivers”的模块

Ubuntu 16.04 -ImportError:没有名为“UbuntuDrivers”的模块

我在打开软件属性时遇到了一些问题,它正在关闭;甚至无法打开。我尝试在终端上打开它,但出现此错误:

/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.  from gi.repository import GObject, Gdk, Gtk, Gio, GLib
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gdk, Gtk, Gio, GLib
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 37, in <module>
    from softwareproperties.gtk.SoftwarePropertiesGtk import SoftwarePropertiesGtk
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 54, in <module>
    from UbuntuDrivers import detect
ImportError: No module named 'UbuntuDrivers'

我该怎么做才能解决这个问题?或者我做了什么不该做的事情?

答案1

看来您错误地删除了核心 Ubuntu 驱动程序的 Python 库包。请尝试重新安装ubuntu-drivers-common包。

sudo apt-get install --reinstall ubuntu-drivers-common

相关内容