unmet dependencies when installing on debian11 (bullseye/testing)
Hey,
I just realized that discord linux app requires libappindicator1 as an dependency which can not be met on debian bullseye as it is phased out. this is the current testing release and will become stable end of the year.
Here you can find the 2 year old deprecation warning by debian recommending switching to libayatana. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037
I can confirm that the app indicator of discord still works after editing the dependency from libappindicator1 to libayatana-appindicator1 without further changes.
Hope you could test this and change the dependency to something like "libappindicator1 | libayatana-appindicator1".
Thanks
-
upvoted cause pretty damn relevant + this is an issue for every app that's built on electron, I first encountered the issue for deltachat, if you're interested there has been a conversation about it on their github issue tracker: https://github.com/deltachat/deltachat-desktop/issues/2040
their conclusionis that from now on you'll probably need two versions for .deb packages. one for anything older than debian bullseye and one for anything from debian bullseye on.
we can be very thankful to debian to crush electron apps I guess...
1 -
If you ever encounter such en issue please mention the upstream bug i reported with electron [1] and/or comment on that. It might be helpful and speed up the fix if i'm not the only one reporting this to electron.
You can always only recommend libappindicator1 instead of depending on it. in my opinion a missing tray icon does't break an app which i tried to reccomend to others [2]
[1] https://github.com/electron/electron/issues/27527
[2] https://github.com/signalapp/Signal-Desktop/issues/4761#issuecomment-772775828
Cheers3 -
I also think that making it a recommended dependency and not having a tray icon would be much better than not being able to install Discord at all.
1 -
It's been 4 month since discovery, is there any solution?
1 -
Bastrabun
Consider trying this out. https://github.com/signalapp/Signal-Desktop/issues/4761#issuecomment-778144713
That issue includes other potential solutions.Hope this helps.
Cheers!
0 -
Bastrabun
The package is not included in bullseye but should be part of Debian sid; if you have knowledge of Linux and know how to modify the `sources.list` file, this may be a more straightforward solution: https://stackoverflow.com/a/66958354
The steps should be the same, and that should allow you to install any package that is not available in bullseye.
1 -
The suggested solution in the stackoverflow link amounts to turning your system into what is know as a "FrankenDebian".
This is heavily discouraged. https://wiki.debian.org/DontBreakDebian
Discord developers should switch to libayatana-appindicator as @valium suggested or drop the dependency alltogether.
In the meantime users can edit the deb packge by hand but I agree that this isn't very practical.
3 -
I used the valium solution. This post helped me to modify the .deb dependencies: https://medium.com/@kasunmaduraeng/how-to-modify-and-repack-deb-package-436f8351af41
Before creating the .deb package make sure the permissions of the source code are >=0755 y <=0775 . If the permissions are not correct the launcher will not have permission to execute discord.
0 -
I think a better approach would be to do something like this for the package (in the `control` file):
Depends: libc6, libasound2, libatomic1, libgconf-2-4, libnotify4, libnspr4, libnss3, libstdc++6, libxss1, libxtst6, libappindicator1 | libayatana-appindicator1, libc++1
That `|` is interpreted sort of like an `or` operator [1] when checking dependencies. So, it'll require `libappindicator1` or `libayatana-appindicator1` to be installed, but not both.
That would eliminate any issues with needing to maintain two separate packages just for a single dependency. This kind of approach would have to actually be taken up in Discord's packaging to work out of the box though.
[1]: https://www.debian.org/doc/debian-policy/ch-relationships.html#syntax-of-relationship-fields
Edit: just realized valium actually already mentioned that :/. Guess it just needs to be implemented then.
1 -
Thanks for the solutions above to repack the .deb file.
So here's a one-liner to replace libappindicator1 dependency with libayatana-appindicator1 and repack, in case someone want to just quickly copy and paste for their own installation:
dpkg-deb -R discord-0.0.15.deb /tmp/discord-deb && sed -i 's/libappindicator1/libayatana-appindicator1/g' /tmp/discord-deb/DEBIAN/control && dpkg-deb -b /tmp/discord-deb discord-fixed.deb
9 -
When I use the one liner to fix 0.0.16 discord installs, but I don't have permissions to launch the installed app. mauriciormr what source code (where in the unpacked directory structure) do we need to check the permissions on before we make the fixed .deb?
0 -
jodosh I don't remember very well but you could try in the directory where you have the modified source code, where you modified the dependencies file. Please check this link: https://medium.com/@kasunmaduraeng/how-to-modify-and-repack-deb-package-436f8351af41... You have to modify `oldpackage/` permissions. I made this screenshot when I created the package. It's in Spanish but maybe it will help you.
Image: https://s3.us-west-2.amazonaws.com/secure.notion-static.com/68683b06-4f21-4a3b-8c7b-36c33b365ea3/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20210923%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210923T164514Z&X-Amz-Expires=86400&X-Amz-Signature=0849c54942eb33460184f06e34ff24ee3d0a5ac4683d108309dfbdd18c9bb3a7&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%220 -
Update for future readers. My issue wasn't permissions, it was ownership. I ran the one liner as my user account so the .deb installed discord as my user. Ether run the one liner as root or chown the installed files back to root and things work great.
0 -
for everybody having the same issue, discord package is now awailable in the MPR for all Debian and Ubuntu based systems which fixes the broken dependency on Debian Bullseye.
0 -
What worked for me was just using
sudo dpkg --force-depends -i discord-0.0.16.debthat way you don't have the hassle of de-packaging, editing and repackaging it again.
2 -
Takamoto I would not recommend --force-depends. Now I cannot upgrade with "apt upgrade".
1 -
big ups to ma homez: 羊驼 ×1 for the copy pasta. delicious!
0 -
Just add Debian 10 buster main repository to your /etc/apt/sources.list
deb http://deb.debian.org/debian/ buster main
deb-src http://deb.debian.org/debian/ buster main
then :
sudo apt-get update
then:
sudo apt-get install -f
1 -
Popo dont do that. it may seem fine at first but once you do an apt upgrade your dependencies will break and you will more likely than not brick your entire system and have to reinstall.
just patch the deb manually for now and wait another couple years for them to fix it. :)
0 -
I tried 羊驼 ×1 one liner, but it didnt install properly, tried unninstalling it but theres still stuff behind so now i cant even try to re-install
0 -
dotexe1337 it works just fine. Debian 10 dependencies do not override Debian 11 dependencies. System works OK.
UGH Dany try the solution I posted above (Debian 10 repo)0
Please sign in to leave a comment.
Comments
21 comments