I had such issue with new version of Debian 11 (2021-09-07).
Here is what I did to install Slack desktop app on Debian.
I will use slack-desktop-4.19.2-amd64.deb
file for the example
dpkg-deb -x slack-desktop-4.19.2-amd64.deb unpack
dpkg-deb --control slack-desktop-4.19.2-amd64.deb unpack/DEBIAN
Open the file ./unpack/DEBIAN/control
and replace
libappindicator3-1
with
libayatana-appindicator3-1
After that do
dpkg -b unpack slack.deb
Now you should have slack.deb
file.
The last step is sudo apt install ./slack.deb
Or you can use below script
#!/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"
like this:
apt-install-libayatana BreakTimer.deb
Source is here https://github.com/rofrol/dotfiles/blob/master/bin/apt-install-libayatana