在最近一次升级之后,我似乎删除了 network-manager-gnome,或者升级了 -f,所以我没有在面板中看到网络指示器。网络处于活动状态,包括无线和本地网络。
我努力了:
nm-applet,它没有安装。如果我尝试通过安装 network-manager-gnome 来安装它,我会收到:
The following packages have unmet dependencies: network-manager-gnome : Depends: default-dbus-session-bus but it is not installable or dbus-session-bus but it is not installable Recommends: mobile-broadband-provider-info but it is not going to be installed E: Unable to correct problems, you have held broken packages.
重新启动服务
sudo service network-manager restart
只是重新启动它以使其再次工作,但同样没有指示。
编辑(要求的输出):
输出
cat nm-applet
:[Desktop Entry] Name=Network Comment=Manage your network connections Icon=nm-device-wireless Exec=nm-applet Terminal=false Type=Application NoDisplay=true NotShowIn=KDE;GNOME; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=NetworkManager X-GNOME-Bugzilla-Component=nm-applet X-GNOME-UsesNotifications=true X-Ubuntu-Gettext-Domain=nm-applet
locate nm-applet
表示:gaj@gaj-Lenovo-Z51-70:~$ locate nm-applet /etc/xdg/autostart/nm-applet.desktop /usr/share/app-install/desktop/network-manager-gnome:nm-applet.desktop /usr/share/locale-langpack/en_AU/LC_MESSAGES/nm-applet.mo /usr/share/locale-langpack/en_CA/LC_MESSAGES/nm-applet.mo /usr/share/locale-langpack/en_GB/LC_MESSAGES/nm-applet.mo /usr/share/locale-langpack/hr/LC_MESSAGES/nm-applet.mo
如果我尝试使用安装 network-manager-gnome,
aptitude
我会得到:The following NEW packages will be installed: network-manager-gnome{b} 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 910 kB of archives. After unpacking 6049 kB will be used. The following packages have unmet dependencies: network-manager-gnome : Depends: default-dbus-session-bus which is a virtual package and is not provided by any available package. or dbus-session-bus which is a virtual package and is not provided by any available package. The following actions will resolve these dependencies: Keep the following packages at their current version: 1) network-manager-gnome [Not Installed] Accept this solution? [Y/n/q/?] y
输出:
Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 Investigating (0) network-manager-gnome [ amd64 ] < none -> 1.2.4-0ubuntu2~ubuntu16.04.1~ppa1 > ( gnome ) Broken network-manager-gnome:amd64 Depends on default-dbus-session-bus [ amd64 ] < none > ( none ) Broken network-manager-gnome:amd64 Depends on dbus-session-bus [ amd64 ] < none > ( none ) Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: network-manager-gnome : Depends: default-dbus-session-bus but it is not installable or dbus-session-bus but it is not installable E: Unable to correct problems, you have held broken packages.
无论如何,从更新包列表开始。
请注意,任何进一步的操作都可能会删除重要的网络包,并且您可能会遇到复杂的非网络情况。因此,在阅读其余步骤之前,请小心不要删除任何内容。
如果可能,请使用 aptitude。
(如果已安装)。它在解决依赖关系方面确实比 apt-get 或您正在使用的任何 GUI 都更具侵略性。查看手册页,但为了快速入门,您可以通过按几次“b”(代表损坏的)来查看所有损坏的包。然后只需点击一次“g”(代表go)并查看有关建议解决方案的包树。如果解决方案没有删除整个系统:)(超过几个 debs),您可以使用第二个“g”应用它。
如果您没有资质或上述修复未成功,请通过以下方式修复所有损坏的软件包:
如果您仍然没有运气,则需要手动修复它,并花费更多时间来解决问题。在这种情况下,首先查看 hold 包:
或者
然后查看损坏的包:
然后松开那个让你发疯的破碎的:
并尝试
再次。
最后你可以尝试安装 aptitude 并使用它来安装你需要的包。如果这不成功,请将保留和损坏的软件包列表添加到您的问题中,因为您可能确实损坏了依赖项。
从问题作者收到额外信息后编辑
似乎您安装了一些 PPA,它优先考虑版本为 1.2.4-0ubuntu2~ubuntu16.04.1~ppa1 的network-manager-gnome软件包,而不是目前最新的稳定版(在 16.04 中)1.2.0-0ubuntu0.16.04 .4. 较新的软件包可能来自一些 gnome-backport 存储库,例如gnome-backport 存储库,如下所示。
继续的两种方法...
对于场景 1:我的下一个建议是通过运行以交互模式启动aptitude
sudo aptitude
,然后按斜杠(“/”)进行搜索并在搜索字段network-manager-gnome中写入并输入。选择包后,使用 enter 打开它,然后使用箭头/pgdown 到信息页面的底部。在那里您可以选择安装正式版本“1.2.0-0ubuntu0.16.04.4” - 选择它并按加号(+)。这将触发 aptitude 的包依赖解析器,它会尝试为您提供解决方案。如果 hedaer 变红,这意味着有一些损坏的依赖关系 - 按几次“b”来检查它们......不幸的是,该决议很可能会删除所有向后移植的 Gnome 员工……如果你能忍受 - 那就去做吧。然后尝试通过 aptitude 安装任何其他软件包,以提前查看您会遇到什么混乱...
对于场景 2:我们首先需要知道您正在使用的 backport 存储库......可能不是这个,所以正如评论讨论中所建议的那样 - 给出输出
和
您的 locate 命令表明您缺少
usr/share/nm-applet/
目录中的大量内容。您缺少的内容可以在 network-manager-gnome_1.1.93-1ubuntu1_amd64.deb 包中找到,该包可以在这里找到。如果您无法通过正常方式安装它 dpkg 对这种情况有一个大锤子并发出命令sudo dpkg -i --force-downgrade network-manager-gnome_1.1.93-1ubuntu1_amd64.deb
如果您有当前备份 对于更大的锤子,您可以使用 --force-depends 或 --force-all 开关
我不是在开玩笑说备份。有关 dpkg force 选项的更多信息可用以下命令:
dpkg --force-help
为方便起见,我在下面复制了这些信息您似乎从 ppa:vascofalves/gnome-backports 获得了您安装的版本,我建议您从您的 sources.list 中删除此 PPA,因为它在描述中明确说明
资料来源:
http://packages.ubuntu.com/xenial/amd64/network-manager-gnome/download
如何删除 PPA?
https://launchpad.net/~vascofalves/+archive/ubuntu/gnome-backports
这是一个通过使用 aptitude 重新安装或安装 network-manager-gnome 解决的问题,我被告知依赖关系可以解决,也可以不改变任何东西。解决依赖关系解决了问题(降低了它们)。