单击“软件和更新”应用程序后,我似乎无法显示它。我不知道为什么。它的图标出现在快捷方式中。激活此应用程序的终端命令是什么?
我试过这个答案:“软件更新程序”和“软件和更新”不起作用,但它不起作用。
$ uname -a
Linux Ubuntu 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ gnome-shell --version
GNOME Shell 3.28.4
$ software-properties-gtk
ERROR:dbus.proxies:Introspect error on :1.228:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
Traceback (most recent call last):
File "/usr/bin/software-properties-gtk", line 100, in <module>
app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 173, in __init__
self.backend.Reload();
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.228 was not provided by any .service files
我也有与 Ubuntu 18.04 software-properties-gtk 相同的 msgs失败 org.freedesktop.DBus.Error.ServiceUnknown。我使用 Synaptic 重新安装此答案python3-size
中提到的软件包,但无济于事。
我也尝试过这里software-properties-gtk
提到的清除和重新安装,但无济于事。
更新1:
我想知道setuptools.py
ver 50.0 是否破坏了软件-属性-gtk 的连接?我知道系统昨天从版本 42.0.2 升级了这个。我刚刚发现22 小时前提出的这个 GitHub 问题“ setuptools 50 breaks pip installation ”。我已经卸载了它,但没有用。
更新 2:在终端中
使用journalctl -e
cmd,我发现了这个错误消息:
Oct 04 08:22:14 Prime dbus-daemon[1303]: [system] Activating service name='com.ubuntu.SoftwareProperties' requested by ':1.157' (uid=1000 pid=10808 comm="/usr/bin/python3 /usr/bin/soft
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: Unable to init server: Could not connect: Connection refused
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: Unable to init server: Could not connect: Connection refused
Oct 04 08:22:14 Prime dbus-daemon[1303]: [system] Successfully activated service 'com.ubuntu.SoftwareProperties'
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: Traceback (most recent call last):
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: File "/usr/lib/software-properties/software-properties-dbus", line 68, in <module>
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: server = SoftwarePropertiesDBus(bus, datadir=datadir)
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: File "/usr/lib/python3/dist-packages/softwareproperties/dbus/SoftwarePropertiesDBus.py", line 66, in __init__
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: self._livepatch_service = LivepatchService()
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: File "/usr/lib/python3/dist-packages/softwareproperties/LivepatchService.py", line 93, in __init__
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: self._session = requests_unixsocket.Session()
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: NameError: name 'requests_unixsocket' is not defined
此外,python 包“requests_unixsocket”安装在系统中(见下文)。因此我不明白错误消息NameError: name 'requests_unixsocket' is not defined
:
$ pip list | grep requests
requests 2.24.0
requests-unixsocket 0.1.5
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
$ pip3 list | grep requests
requests 2.24.0
requests-unixsocket 0.1.5
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
$ pip3 list --user | grep requests
requests 2.24.0
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
我试图明确导入 requests_unixsocket 。有用。见下文。
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license()" for more information.
>>> import requests_unixsocket
>>> a = requests_unixsocket.Session()
>>> a
<requests_unixsocket.Session object at 0x7fb103952470>
我不明白为什么我可以导入包但/usr/lib/python3/dist-packages/softwareproperties/LivepatchService.py
看不到它。它确实存在:
$ ls /usr/lib/python3/dist-packages/ | grep request
requests_unixsocket
requests_unixsocket-0.1.5.egg-info
我在 Ubuntu 20.04 上遇到了这个问题。我尝试了建议重新安装
python3-six
and的帖子python3-certifi
,但这些帖子对我不起作用。但是,software-properties-gtk
在我重新安装python3-requests
和python3-idna
. 所以,总结一下我运行的命令:我又开始做生意了。
Ubuntu 20.10 上的同样问题...我查看了 dbus 消息:
并看到了这一行:
所以我重新安装了chardet:
并且
software-properties-gtk
回来了。日志显示:
希望能帮助到你。