STT icon indicating copy to clipboard operation
STT copied to clipboard

Bug: stt complains libbz2.so.1.0 not found

Open alanorth opened this issue 1 year ago • 6 comments

Describe the bug Python stt 1.4.0 from pip crashes due to missing libbz2.so.1.0 on CentOS Stream 8 and probably all RPM-based distros:

$ stt
Traceback (most recent call last):
  File "/tmp/venv-test/bin/stt", line 5, in <module>
    from stt.client import main
  File "/tmp/venv-test/lib/python3.9/site-packages/stt/__init__.py", line 23, in <module>
    from stt.impl import Version as version
  File "/tmp/venv-test/lib/python3.9/site-packages/stt/impl.py", line 13, in <module>
    from . import _impl
ImportError: libbz2.so.1.0: cannot open shared object file: No such file or directory

But bzip2 libs are installed:

$ dnf list installed bzip2\*
Installed Packages
bzip2.x86_64                                         1.0.6-26.el8                         @baseos
bzip2-devel.x86_64                                   1.0.6-26.el8                         @baseos
bzip2-libs.x86_64                                    1.0.6-26.el8                         @baseos

And libbz2.so is available, albeit as libbz2.so.1:

$ ldconfig -p | grep libbz2
        libbz2.so.1 (libc6,x86-64) => /lib64/libbz2.so.1
        libbz2.so.1 (libc6) => /lib/libbz2.so.1
        libbz2.so (libc6,x86-64) => /lib64/libbz2.so

To Reproduce Steps to reproduce the behavior:

  1. Run the following command pip install stt in a virtual environment
  2. Run the following command stt
  3. See error

Expected behavior stt to not crash.

Environment (please complete the following information):

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux CentOS Stream 8
  • Python version: 3.9

Additional context

I can make a symlink to fix this, but it feels dirty. I'm wondering which systems does this work on? Could stt check for libbz2.so.1 instead, or after checking for libbz2.so.1.0?

alanorth avatar Feb 06 '23 05:02 alanorth