【问题标题】:Missing libappindicator3-1 installing Slack安装 Slack 时缺少 libappindicator3-1
【发布时间】:2021-01-31 11:42:47
【问题描述】:

这是我尝试安装 Slack 时的输出。

$ sudo dpkg -i slack-desktop-4.12.2-amd64.deb 
Selecting previously unselected package slack-desktop.
(Reading database ... 155664 files and directories currently installed.)
Preparing to unpack slack-desktop-4.12.2-amd64.deb ...
Unpacking slack-desktop (4.12.2) ...
dpkg: dependency problems prevent configuration of slack-desktop:
 slack-desktop depends on libappindicator3-1; however:
  Package libappindicator3-1 is not installed.

dpkg: error processing package slack-desktop (--install):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for mailcap (3.68) ...
Errors were encountered while processing:
 slack-desktop

然后我尝试安装依赖项

$ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  slack-desktop
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 148 MB disk space will be freed.
Do you want to continue? [Y/n] 

我不明白为什么会这样。我已经跑了

apt-get update
apt-get upgrade
apt-get clean
apt-get autoclean

这里有一些可能有用的信息:

$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian testing main contrib non-free

$ cat /etc/*release*
PRETTY_NAME="Debian GNU/Linux bullseye/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

另外,我有另一台笔记本电脑运行 Debian 测试并安装了 libappindicator3-1:

$ apt policy libappindicator3-1
libappindicator3-1:
  Installed: 0.4.92-8
  Candidate: 0.4.92-8
  Version table:
 *** 0.4.92-8 100
        100 /var/lib/dpkg/status

【问题讨论】:

    标签: debian


    【解决方案1】:

    我在使用新版本的 Debian 11 (2021-09-07) 时遇到了这样的问题。 这是我在 Debian 上安装 Slack 桌面应用程序所做的。 我将使用slack-desktop-4.19.2-amd64.deb 文件作为示例

    dpkg-deb -x slack-desktop-4.19.2-amd64.deb unpack
    dpkg-deb --control slack-desktop-4.19.2-amd64.deb unpack/DEBIAN
    

    打开文件./unpack/DEBIAN/control并替换 libappindicator3-1libayatana-appindicator3-1

    然后做

    dpkg -b unpack slack.deb
    

    现在你应该有slack.deb 文件。

    最后一步是sudo apt install ./slack.deb

    或者你可以使用下面的脚本

    #!/bin/bash
    
    package="$1"
    name="$(basename ${package} .deb)"
    
    dpkg-deb -x "$package" "$name"
    dpkg-deb --control "$package" "$name"/DEBIAN
    sed -i -- 's/libappindicator3-1/libayatana-appindicator3-1/g' ./"$name"/DEBIAN/control
    new="${name}-debian.deb"
    dpkg -b "$name" "$new" 
    rm -rf "$name"
    sudo apt install ./"$new"
    

    像这样:

    apt-install-libayatana BreakTimer.deb

    来源在这里https://github.com/rofrol/dotfiles/blob/master/bin/apt-install-libayatana

    【讨论】:

    • @Paval github 链接已损坏。其他人有脚本的链接吗?或者更好的是,将脚本粘贴到此处?
    • 脚本的链接由@rofrol 添加。我没有任何脚本。但是手动或者自己写很容易,不会太复杂。
    • 最后一步,你必须运行sudo apt install ./slack.deb 对我不起作用(它仍然会抛出未满足的依赖错误)。这样做:sudo dpkg -i slack.deb 确实很有魅力。谢谢!
    • 真的很棒。
    【解决方案2】:

    对于 Debian 11 (Bullseye),您可以手动下载缺少的依赖项的 Debian 10 (Buster) 版本:

    然后您可以将它们与 Slack 一起安装:

    sudo apt install \
         ./libappindicator3-1_0.4.92-7_amd64.deb \
         ./libindicator3-7_0.5.0-4_amd64.deb \
         ./slack-desktop-4.20.0-amd64.deb
    

    【讨论】:

      【解决方案3】:

      最好使用equivs:

      这并不比在安装包文件之前进入并修改包文件中的依赖项更粗略,并且它具有在欺骗依赖项的两侧持续对包升级进行黑客攻击的实质性好处。 https://www.reddit.com/r/debian/comments/q7ymc7/convert_deb_to_use_libayatanaappindicator3/hgluc40/

      $ sudo apt install equivs
      $ equivs-control libappindicator3-1.equivs
      $ $EDITOR libappindicator3-1.equivs
      $ cat libappindicator3-1.equivs
      Section: misc
      Priority: optional
      Standards-Version: 1.0
      Package: libappindicator3-1
      Description: dummy libappindicator3-1 package
      Depends: libayatana-appindicator3-1
      $ equivs-build libappindicator3-1.equivs
      $ sudo dpkg -i libappindicator3-1_1.0_all.deb
      $ sudo dpkg -i BreakTimer.deb
      

      【讨论】:

      • 我添加了Depends: libayatana-appindicator3-1,而不是dpkg,使用了sudo apt install ./libappindicator3-1_1.0_all.deb
      • 当然,但是使用 equivs 它只适用于任何依赖旧库的 deb 应用
      • 我确实使用了 equivs 并将 Depends: libayatana-appindicator3-1 添加到 equivs 文件中。
      • 我明白了。所以如果没有libayatana-appindicator3-1libappindicator3-1_1.0_all.deb 将不会安装。因此它只会安装在存在libayatana-appindicator3-1 的较新系统上。
      【解决方案4】:

      你可以试试这个:

      wget http://ftp.us.debian.org/debian/pool/main/libi/libindicator/libindicator3-7_0.5.0-4_amd64.deb
      wget http://ftp.us.debian.org/debian/pool/main/liba/libappindicator/libappindicator3-1_0.4.92-7_amd64.deb
      
      sudo dpkg -i libindicator3-7_0.5.0-4_amd64.deb
      sudo dpkg -i libappindicator3-1_0.4.92-7_amd64.deb
      sudo dpkg -i slack-desktop-4.12.2-amd64.deb
      

      【讨论】:

      • 感谢,它有效!
      【解决方案5】:

      您可以在 /etc/apt/sources.list 中包含 Sid,如下所示:

      ###### Debian Main Repos
      deb http://deb.debian.org/debian/ testing main contrib non-free
      deb http://deb.debian.org/debian/ testing-updates main contrib non-free
      deb http://deb.debian.org/debian-security testing-security main
      
      # SID
      deb http://deb.debian.org/debian/ sid main contrib non-free
      

      更新您的存储库并安装 libappindicator3-1

      apt update
      apt install libappindicator3-1
      

      下一步是从 /etc/apt/sources.list 中删除 Sid:

      ###### Debian Main Repos
      deb http://deb.debian.org/debian/ testing main contrib non-free
      deb http://deb.debian.org/debian/ testing-updates main contrib non-free
      deb http://deb.debian.org/debian-security testing-security main
      
      # SID
      #deb http://deb.debian.org/debian/ sid main contrib non-free
      

      记得更新您的存储库以避免现在使用 Sid:

      最后从您下载的 .deb 文件安装 Slack:

      apt install /home/lgallard/Downloads/slack-desktop-4.14.0-amd64.deb
      

      您也可以使用Debian documentation 中解释的固定包来固定libappindicator3-1

      【讨论】:

        【解决方案6】:

        您可以尝试使用Dpkg-ayatana 安装包。

        我已经在 Kali GNU/Linux Rolling 上使用 DiscordDraw.ioFigmaSlack 对其进行了测试。

        要安装 Slack 版本 x.x.x,请运行:

        sudo dpkg-ayatana -i slack-desktop-x.x.x-amd64.deb
        

        【讨论】:

        • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
        【解决方案7】:
        【解决方案8】:

        libappindicator3-1不在testing但是available in Debian stable and sid

        # apt show libappindicator3-1
        Package: libappindicator3-1
        Version: 0.4.92-7
        APT-Sources: http://ftp.fr.debian.org/debian buster/main amd64 Packages
        

        希望您可以从那里安装它而不会破坏任何东西

        【讨论】:

        • 我在另一台笔记本电脑上运行 debian 测试,并通过 apt 安装了 libappindicator3-1。
        • @bulkmoustache 这个答案似乎还可以+1,请您将另一台笔记本电脑的apt policy libappindicator3-1 的输出添加到您的问题中。
        • 我已经用您要求的输出更新了原始帖子。谢谢。
        • 这个答案在写的时候是准确的,但现在不是了。 Debian stable 不再包含 libappindicator3-1,sid 也不包含。
        【解决方案9】:

        在 Debian 上启用快照:

        sudo apt update
        sudo apt install snapd
        sudo snap install core
        

        并安装 Slack:

        sudo snap install slack --classic
        

        为我工作。

        【讨论】:

        • 它可能确实有效,但很多人避免使用 snap 包
        • 安装,但在浏览器中没有打开任何超链接。
        猜你喜欢
        • 1970-01-01
        • 2019-10-21
        • 2012-05-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-01-17
        • 1970-01-01
        • 2021-09-04
        相关资源
        最近更新 更多