Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu impish packages link to missing versions of shared libraries #107

Open
zaneselvans opened this issue Nov 27, 2021 · 4 comments
Open

Comments

@zaneselvans
Copy link

I'm excited to see @Ichthyostega had packaged a recent version of the electric sheep up for install on recent versions of Ubuntu. I've missed it a lot since moving to Linux from MacOS.

I'm on Ubuntu 21.10 / impish and after installing electricsheep via the PPA and apt, I got some shared library link errors. It seems like the binaries (for impish anyway) are linked against particular versions of some of the C libraries, that aren't showing up on my system, though later versions of the same libraries do exist. For example:

  • libavcodec.so.57 vs. ibavcodec.so.58
  • libavformat.so.57 vs. libavformat.so.58
  • libswscale.so.4 vs. libswscale.so.5
  • and others

So I'm wondering if somehow the versions didn't get updated between Ubuntu 21.04 and 21.10? Or if maybe the referenced libraries should be the un-versioned .so files instead?

@Ichthyostega
Copy link

maybe due to the fact that I've built that package before the official release of 21.10 ?

I'll investigate that tomorrow in more detail.

@roten7
Copy link

roten7 commented Nov 29, 2021

I recently updated from 18.04 up to 20.04 and the exact same thing happened to me. Exact same issue with the libavcodec.so.57 missing. It broke my current installation so I tried compiling from the latest source to no avail.

@Ichthyostega
Copy link

Hi all,
at the moment I try to understand what's going on and what exactly is the problem.

Thus I started a docker container from the current image ubuntu:impish-20211102
and in that container, added the PPA and installed electricsheep.

from inspecting the excutable which I thus got from the PPA, I see:

root@1288eaecb24d:/# readelf --dynamic /usr/bin/electricsheep

Dynamic section at offset 0x91f40 contains 46 entries:
 Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libavcodec.so.58]
 0x0000000000000001 (NEEDED)             Shared library: [libavformat.so.58]
 0x0000000000000001 (NEEDED)             Shared library: [libswscale.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libavutil.so.56]
 0x0000000000000001 (NEEDED)             Shared library: [liblua5.1.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libglee.so.0d1]
...

which means, it was linked against libavcodec.so.58
and this is resolved on the actual system as

libavcodec.so.58 => /lib/x86_64-linux-gnu/libavcodec.so.58 (0x00007f3241330000)

moreover, when I search for this file

root@1288eaecb24d:/# dpkg --search '/usr/lib/x86_64-linux-gnu/libavcodec.*'
libavcodec58:amd64: /usr/lib/x86_64-linux-gnu/libavcodec.so.58.134.100
libavcodec58:amd64: /usr/lib/x86_64-linux-gnu/libavcodec.so.58

and ...

root@1288eaecb24d:/# apt policy libavcodec58       
libavcodec58:
  Installed: 7:4.4-6ubuntu5
  Candidate: 7:4.4-6ubuntu5
  Version table:
 *** 7:4.4-6ubuntu5 500
        500 http://archive.ubuntu.com/ubuntu impish/universe amd64 Packages
        100 /var/lib/dpkg/status

root@1288eaecb24d:/# apt policy libavcodec57
N: Unable to locate package libavcodec57

So this all seems to be consistent.

Are you sure, you have the correct distro for the PPA in your Apt configuration?
In that docker test container, I get:

root@1288eaecb24d:/# cat /etc/apt/sources.list.d/ichthyo-ubuntu-zeug-impish.list 
deb http://ppa.launchpad.net/ichthyo/zeug/ubuntu/ impish main
# deb-src http://ppa.launchpad.net/ichthyo/zeug/ubuntu/ impish main

Maybe you need to reinstall the package, after adding the PPA on the newer Ubuntu version? I could imagine that the package manager just retained an old package on your system when updating to the newer Ubuntu version. Thus, can you try..

  • add the right ppa for your current Ubuntu version
  • then reinstall the package, i.e. sudo apt install --reinstall electricsheep

@zaneselvans
Copy link
Author

Hmm, weird. I only just last week installed this package and added the PPA for the first time -- after having already upgraded to Impish some time ago, and it looks like i've got the right channel set up here:

cat /etc/apt/sources.list.d/ichthyo-ubuntu-zeug-impish.list
deb http://ppa.launchpad.net/ichthyo/zeug/ubuntu/ impish main
# deb-src http://ppa.launchpad.net/ichthyo/zeug/ubuntu/ impish main

But when I ask apt about the library, it's not available:

apt policy libavcodec58
libavcodec58:
  Installed: (none)
  Candidate: 7:4.4-6ubuntu5
  Version table:
     7:4.4-6ubuntu5 500
        500 http://us.archive.ubuntu.com/ubuntu impish/universe amd64 Packages

If I re-install as you suggested it gets electricsheep:

sudo apt install --reinstall electricsheep
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/456 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 392777 files and directories currently installed.)
Preparing to unpack .../electricsheep_3.0.2-git20191005-1ppa1~impish_amd64.deb ...
Unpacking electricsheep (3.0.2-git20191005-1ppa1~impish) over (3.0.2-git20191005-1ppa1~impish) ...
Setting up electricsheep (3.0.2-git20191005-1ppa1~impish) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69ubuntu1) ...

But the required library version is still missing:

apt policy libavcodec58
libavcodec58:
  Installed: (none)
  Candidate: 7:4.4-6ubuntu5
  Version table:
     7:4.4-6ubuntu5 500
        500 http://us.archive.ubuntu.com/ubuntu impish/universe amd64 Packages

But dpkg seems to think it's available:

dpkg --search '/usr/lib/x86_64-linux-gnu/libavcodec.*'
libavcodec-dev:amd64: /usr/lib/x86_64-linux-gnu/libavcodec.a
libavcodec-extra58:amd64: /usr/lib/x86_64-linux-gnu/libavcodec.so.58.134.100
libavcodec-dev:amd64: /usr/lib/x86_64-linux-gnu/libavcodec.so
libavcodec-extra58:amd64: /usr/lib/x86_64-linux-gnu/libavcodec.so.58

And my installed electricsheep binary is linked against the old version:

readelf --dynamic /usr/local/bin/electricsheep 

Dynamic section at offset 0xb1070 contains 49 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libavcodec.so.57]
 0x0000000000000001 (NEEDED)             Shared library: [libavformat.so.57]
 0x0000000000000001 (NEEDED)             Shared library: [libswscale.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libavutil.so.55]

Ahhhhh, the binary at /usr/local/bin/electrictsheep is from 2018! And a new one that seems to work at /usr/bin/electricsheep So I think that's the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants