Saturday, December 2, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  1] [ 0]  / answers: 1 / hits: 652  / 2 Years ago, tue, september 7, 2021, 4:23:50

If I get it right, then snap installs the application package which contains a binary and the libraries the application depends on, if they're not installed already.

But I wonder how I can view these libraries the application depends on like I can do with apt depends <application> in apt.

More From » apt


tl;dr: there's no such thing, because snaps don't have dependencies.

Snaps don't install dependencies if they're not already installed. They literally bundle them along with the rest of the snap. For example, if you have PHP 7.1 installed as a Debian package, and you install the Nextcloud snap, the Nextcloud snap will be using PHP 7.3 because it includes it inside the snap. In fact, it's confined to the point of not even being able to find out if you have PHP already installed or not, much less have the ability to install more stuff on your host.

Why do they work this way? One of the reasons is so that snap developers can rest assured that you're using exactly what they tested. To re-use the Nextcloud snap example, those maintainers can rest a lot easier releasing updates knowing that it's impossible for any of their users to be using anything other than PHP 7.3. If they had to make sure they tested it against every possible PHP version, releases would be a lot slower and a lot more risky.

Now, time for a little caveat. While snaps don't have traditional dependencies, it's possible for snaps to share content between each other using a special content interface. In that sense it's possible to create snap A that doesn't work properly unless a snap that's providing the content it requires is also installed. However, that doesn't imply that snap A depends on snap B, it implies that snap A depends on something providing it with a particular set of content; that might be snap B, but could also be snap C. For the most part, you can completely ignore this caveat and say "snaps bundle their dependencies."

[#4068] Thursday, September 9, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 357
Total Questions: 120
Total Answers: 119

Location: Croatia
Member since Sat, May 2, 2020
4 Years ago
utschang questions
Mon, Aug 30, 21, 14:09, 2 Years ago
Tue, May 17, 22, 20:44, 2 Years ago
Sun, Jul 11, 21, 23:54, 2 Years ago