0

I have one big question in regards of snaps. Is it sharing libraries? The reason why I ask is because that was one of the things that I was so impressed by when starting with ubuntu, that it was sharing libraries, and therefore saves space on the disk. Does snaps still do this? or am I totally wrong about apt?

2

2 Answers 2

1

There is no guarantee with either snaps nor apt/dpkg, that the app you are using, is relying on system-wide shared libraries, for every dependency they have.

Depending on how a snap is built, it may be using some libraries shared with other snaps (the core snap includes a libc and libstdc++ for example), but neither direction is as simple as it might seem, when it comes down to stability, security, and ensuring users get the latest features in apps.

0

For the current state of my system:

walt@bat:~(0)$ lsb_release -a;snap list
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:   xenial
Name                 Version    Rev   Tracking  Publisher           Notes
bw                   1.8.0      13    stable    bitwarden✓          -
core                 16-2.42.1  8039  stable    canonical✓          core
large-pcap-analyzer  3.6.0      97    stable    francesco-montorsi  -
mpv                  0.26.0     1     beta      casept              -
mpv-casept           0.24.0     2     stable    casept              disabled
walt@bat:~(0)$ 

This command will answer your question for MY system, at this time:

find /snap -type f -executable | \
  xargs file |\
  grep ELF |\
  cut -d: -f1 |\
  xargs -n 1 ldd |\
  grep /snap
  1. Use find to find all the "executable" files under /snap.

  2. Ask file - are the files scripts or execuables or what?

  3. We only care about "ELF" files, as they're the ones using shared libraries.

  4. file outputs the filename, a colon, some blanks and the description. All I want is the filename.

  5. Then I use xargs to feed the filenames, one at a time (-n 1) to ldd to list the dynamic libraries used by each ELF executable.

  6. Are any of the libraries in /snap?

    Nothings I see (other than "what if the other, library-containing snap isn't installed?") prevents it,

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .