AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1271611
Accepted
Sun Bear
Sun Bear
Asked: 2020-09-01 09:48:20 +0800 CST2020-09-01 09:48:20 +0800 CST 2020-09-01 09:48:20 +0800 CST

应用程序“软件和更新”没有响应

  • 772

单击“软件和更新”应用程序后,我似乎无法显示它。我不知道为什么。它的图标出现在快捷方式中。激活此应用程序的终端命令是什么?

我试过这个答案:“软件更新程序”和“软件和更新”不起作用,但它不起作用。

$ 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.pyver 50.0 是否破坏了软件-属性-gtk 的连接?我知道系统昨天从版本 42.0.2 升级了这个。我刚刚发现22 小时前提出的这个 GitHub 问题“ setuptools 50 breaks pip installation ”。我已经卸载了它,但没有用。

更新 2:在终端中 使用journalctl -ecmd,我发现了这个错误消息:

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
software-sources 18.04
  • 2 2 个回答
  • 1102 Views

2 个回答

  • Voted
  1. Best Answer
    Steve Landers
    2021-01-31T16:26:17+08:002021-01-31T16:26:17+08:00

    我在 Ubuntu 20.04 上遇到了这个问题。我尝试了建议重新安装python3-sixand的帖子python3-certifi,但这些帖子对我不起作用。但是,software-properties-gtk在我重新安装python3-requests和python3-idna. 所以,总结一下我运行的命令:

    sudo apt install --reinstall python3-six python3-certifi python3-requests python3-idna
    sudo apt install --reinstall software-properties-gtk
    software-properties-gtk
    

    我又开始做生意了。

    • 6
  2. Jeifei Keengee
    2021-03-01T10:28:15+08:002021-03-01T10:28:15+08:00

    Ubuntu 20.10 上的同样问题...我查看了 dbus 消息:

    sudo systemctl status dbus.service
    

    并看到了这一行:

    .../... com.ubuntu.SoftwareProperties[8310]: ModuleNotFoundError: No module named 'chardet'
    

    所以我重新安装了chardet:

    sudo apt install --reinstall python3-chardet
    

    并且software-properties-gtk回来了。

    日志显示:

    dbus-daemon[1130]: [system] Successfully activated service 'com.ubuntu.SoftwareProperties'
    

    希望能帮助到你。

    • 2

相关问题

  • 您为 10.10 软件使用哪些存储库?

  • '..-backports' 存储库是否自动优先于标准存储库?在sources.list中

  • 如何恢复升级时忽略的源?

  • 如何添加未列出的存储库作为我的主要“软件源”?

  • 尝试更新时出现 404 错误

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve