网络指示器丢失但已连接(16.04 LTS Unity)


9

在最近一次升级之后,似乎我已经删除了network-manager-gnome,或者升级了-f了,所以在面板上看不到网络指示器。网络处于活动状态,包括无线和本地网络。

我努力了:

  1. 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.
    
  2. 重新启动服务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
    
  • 如果我尝试使用aptitudei 来安装network-manager-gnome,请执行以下操作:

    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.
    

编辑您的帖子,以包含cat /etc/xdg/autostart/nm-applet.desktop
Elder Geek

还要编辑以指示您正在运行的Ubuntu风格。感谢您对我们的帮助!
极客长老

它需要仔细检查包装状态。如果有时间,您可以访问AskUbuntu一般聊天室并ping me(@Anwar)。我可以尝试帮助您。基本上,您需要查明是什么导致了未满足的依赖关系错误
Anwar

我只是这样做了,但这似乎与依赖性无关,而仅仅是启动指标的问题。可能是名称或输出已更改,所以它不会启动。我用您要求的输出编辑了我的问题。
Mookey

1
@Mookey,官方network-manager-gnome不依赖dbus-session-bus,您可能从PPA 复制了错误的副本。您可以添加的输出吗apt-cache policy network-manager-gnome; apt-cache show network-manager-gnome?您可以将它们发布到paste.ubuntu.com,因为问题已经很久了。
user.dz

Answers:


3

您的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为方便起见,我在下面复制了这些信息:

dpkg forcing options - control behaviour when problems found:
  warn but continue:  --force-<thing>,<thing>,...
  stop with error:    --refuse-<thing>,<thing>,... | --no-force-<thing>,...
 Forcing things:
  [!] all                Set all force options
  [*] downgrade          Replace a package with a lower version
      configure-any      Configure any package which may help this one
      hold               Process incidental packages even when on hold
      not-root           Try to (de)install things even when not root
      bad-path           PATH is missing important programs, problems likely
      bad-verify         Install a package even if it fails authenticity check
      bad-version        Process even packages with wrong versions
      overwrite          Overwrite a file from one package with another
      overwrite-diverted Overwrite a diverted file with an undiverted version
  [!] overwrite-dir      Overwrite one package's directory with another's file
  [!] unsafe-io          Do not perform safe I/O operations when unpacking
  [!] confnew            Always use the new config files, don't prompt
  [!] confold            Always use the old config files, don't prompt
  [!] confdef            Use the default option for new config files if one
                         is available, don't prompt. If no default can be found,
                         you will be prompted unless one of the confold or
                         confnew options is also given
  [!] confmiss           Always install missing config files
  [!] confask            Offer to replace config files with no new versions
  [!] architecture       Process even packages with wrong or no architecture
  [!] breaks             Install even if it would break another package
  [!] conflicts          Allow installation of conflicting packages
  [!] depends            Turn all dependency problems into warnings
  [!] depends-version    Turn dependency version problems into warnings
  [!] remove-reinstreq   Remove packages which require installation
  [!] remove-essential   Remove an essential package

WARNING - use of options marked [!] can seriously damage your installation.
Forcing options marked [*] are enabled by default.

看来您从ppa:vascofalves / gnome-backports获得了已安装的版本,我建议您从您的sources.list中删除此PPA,因为它在描述中明确指出:

PPA description

Backports of GNOME packages. This is for my personal use. Don't expect anything here to work properly.

资料来源:

http://packages.ubuntu.com/xenial/amd64/network-manager-gnome/download

如何删除PPA?

https://launchpad.net/~vascofalves/+archive/ubuntu/gnome-backports


4
  1. 无论如何,都从更新软件包列表开始。

    sudo apt-get update
    

    请注意,任何进一步的操作都可能会删除重要的网络程序包,但是您可能会遇到复杂的非网络情况。因此,在阅读其余步骤之前,请注意不要删除任何内容。

  2. 如有可能,请使用aptitude。

    sudo aptitude
    

    (如果已安装)。与apt-get或您使用的任何GUI相比,它在解决依赖项方面确实更具攻击性。看一下联机帮助页,但是要快速入门,请按几次“ b”(代表Breaked),可以看到所有损坏的软件包。然后只需按一下“ g”(代表go),然后查看有关建议解决方案的软件包树。如果解决方案不是删除整个系统:)(超过几个deb),则可以将其与第二个“ g”一起应用。

  3. 如果您没有能力或上述修复没有成功,请通过以下方法修复所有损坏的包装:

    sudo apt-get -f install
    
  4. 如果仍然没有运气,则需要手动修复它,这需要花费更多时间来解决问题。在这种情况下,请先查看hold软件包:

    apt-mark showhold 
    

    要么

    dpkg --get-selections | grep hold
    

    然后查看损坏的包装:

    dpkg -l | grep ^..r 
    

    然后解开使您生气的破碎的那一个:

    sudo apt-mark unhold package_name
    

    并尝试

    sudo apt-get -f install
    

    再次。

最后,您可以尝试安装aptitude并将其用于安装所需的软件包。如果这不成功,请向您的问题中添加保留和损坏的软件包列表,因为您可能确实有损坏的依赖项。

在收到问题作者的其他信息后进行编辑

看来您已经安装了一些PPA,该版本相对于当前的最新稳定版本(在16.04中)1.2.0-0ubuntu0.16.04 具有更高的优先级,版本1.2.4-0ubuntu2〜ubuntu16.04.1〜ppa1的network-manager-gnome软件包.4。较新的软件包可能来自某些gnome-backport仓库,例如gnome-backport仓库,例如this

两种继续的方法...

  1. 还原Gnome的稳定版本(针对16.04)
  2. 查找其他任何PPA中缺少的软件包

对于场景1:我的下一个建议是通过运行然后以斜杠(“ /”)进行交互,以交互方式启动智能sudo aptitude然后在搜索字段network-manager-gnome中输入并输入。选择包后,请按Enter打开它,并使用箭头/ pgdown进入信息页面的底部。您可以在此处选择安装正式版本“ 1.2.0-0ubuntu0.16.04.4”-选择它,然后按加号(+)。这将触发aptitude软件包依赖解析器,并尝试为您提供解决方案。万一hedaer变红,这意味着存在一些破坏性的依赖关系-多次按“ b”进行检查...

不幸的是,该解决方案很可能将删除所有向后移植的Gnome工作人员。然后尝试通过aptitude安装任何其他软件包,以提前了解可能会遇到的麻烦...

对于场景2:我们首先需要知道您正在使用的backport存储库...可能不是此库,因此如注释讨论中所建议-提供以下内容:

egrep -v '^#|^ $' /etc/apt/sources.list /etc/apt/sources.list.d/ 

egrep Pin-Priority /etc/apt/preferences /etc/apt/preferences.d/*

资质并没有透露任何可升级的软件包或未满足的依赖关系。一切正常,没有任何能力可以解决。只是没有小程序。
Mookey '16

@Mookey,然后“ sudo aptitude安装network-manager-gnome”?输出是什么?
罗斯蒂斯拉夫·坎迪拉罗夫

我刚刚编辑了它。
Mookey '16

所以...看来您有一些具有更高优先级的PPA。从一开始就没有问过我的事让我感到羞耻...所以,请您提供以下输出:“ egrep -v'^#| ^ $'/etc/apt/sources.list / etc / apt / sources.list.d /和“
Rostislav Kandilarov

1
@ user.dz,建议使用比我更聪明的方法来查找“反向移植” PPA的来源。在这里发表评论,因为我没有足够的声誉来解决问题。
Rostislav Kandilarov '16

1

通过使用aptitude重新安装或安装network-manager-gnome可以解决此问题,在该问题上,我被告知可以解决依赖关系或不进行任何更改。解决依赖关系解决了问题(使它们降级)。


降级 ”,因此您要从其他回购中获得一些软件包,然后从Ubuntu官方发行版中获得。您能否共享这些软件包的列表,可以从APT历史记录中获取。
user.dz

1
ppa:vascofalves / gnome-backports
Mookey
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.