我无法从 ubuntu 16.04 系统的 GUI 或终端打开“软件和更新”
sudo software-properties-gtk
sudo: unable to resolve host dna-ws: Connection timed out
[sudo] password for localadmin:
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 29, in <module>
import dbus
File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 82, in <module>
import dbus.types as types
File "/usr/lib/python3/dist-packages/dbus/types.py", line 6, in <module>
from _dbus_bindings import (
ModuleNotFoundError: No module named '_dbus_bindings'
Run Code Online (Sandbox Code Playgroud)
我也无法使用 GUI 安装软件
我试过;
sudo apt-get install python-dbus
sudo: unable to resolve host dna-ws: Connection timed out
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dbus is already the newest version (1.2.0-3).
python-dbus set to manually installed.
0 to upgrade, 0 to newly install, 0 to remove and 187 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up ssmtp (2.64-8ubuntu1) ...
hostname: Temporary failure in name resolution
dpkg: error processing package ssmtp (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
我不知道该怎么做才能解决这个问题,不想对系统造成任何损害。
我的情况,这个错误消息,当从 3.6 (ubuntu 18.04) 升级到 3.7 时:
$ pwd
/usr/lib/python3/dist-packages
$ sudo cp _dbus_bindings.cpython-36m-x86_64-linux-gnu.so _dbus_bindings.cpython-37m-x86_64-linux-gnu.so
$ sudo cp _dbus_glib_bindings.cpython-36m-x86_64-linux-gnu.so _dbus_glib_bindings.cpython-37m-x86_64-linux-gnu.so
Run Code Online (Sandbox Code Playgroud)
小智 1
看来该软件包ssmtp没有完全安装。您可以尝试使用 重新安装它,sudo apt install --reinstall ssmtp或者如果您的计算机上没有运行本地邮件服务,则可以使用 删除它sudo apt remove ssmtp。