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

CRITICAL : build and install from source breaks Debian flavoured Linux #1276

Open
awilkins opened this issue Mar 3, 2025 · 2 comments
Open

Comments

@awilkins
Copy link

awilkins commented Mar 3, 2025

Problem :

Build and installed watchman from source.

The build system places liblzma.so.5 at /usr/local/lib

The version used is incompatible with the expectations of the Debian based install system (which seems to label the version 5.6 but expects 5.4, see this thread for similar symptoms.

After this, attempting any apt, apt-get, dpkg etc operation results in symptoms like those below.

Removing the library from this folder fixes this (but breaks watchman). I guess I was lucky that I didn't change the prefix to /usr as this would have been harder to debug.

❯ watchman
watchman: error while loading shared libraries: /usr/local/lib/liblzma.so.5: cannot open shared object file: No such file or directory

(Is this at the root of why there hasn't been a Linux build since 2024-04 ?)

Posting this for information as much as anything else : building and installing from source on Linux will put many people's systems into a broken state they might not have the skills to recover from.


After this operation, 5,431 kB disk space will be freed.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg-deb: /usr/local/lib/liblzma.so.5: version `XZ_5.4' not found (required by dpkg-deb)
dpkg: error processing archive /var/cache/apt/archives/python3.12-dev_3.12.3-1ubuntu0.5_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 1
dpkg-deb: /usr/local/lib/liblzma.so.5: version `XZ_5.4' not found (required by dpkg-deb)
dpkg: error processing archive /var/cache/apt/archives/libpython3.12-dev_3.12.3-1ubuntu0.5_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 1
dpkg-deb: /usr/local/lib/liblzma.so.5: version `XZ_5.4' not found (required by dpkg-deb)
dpkg: error processing archive /var/cache/apt/archives/libpython3.12t64_3.12.3-1ubuntu0.5_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 1
dpkg-deb: /usr/local/lib/liblzma.so.5: version `XZ_5.4' not found (required by dpkg-deb)
dpkg: error processing archive /var/cache/apt/archives/libssl-dev_3.0.13-0ubuntu3.5_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg-deb: /usr/local/lib/liblzma.so.5: version `XZ_5.4' not found (required by dpkg-deb)
dpkg: error processing archive /var/cache/apt/archives/libssl3t64_3.0.13-0ubuntu3.5_amd64.deb (--unpack):

Verified/Diagnosed this by

  1. Noting the mod time on the library in /usr/local/lib
  2. Guessing that it might have been an install from source that put it there
  3. Searching $HOME for files that were modded that day
  4. Seeing the watchman folder
  5. Finding a liblzma.so.5 file in the build outputs timestamped 6 minutes before the offending lib
  6. Comparing the sha1sum of both files and noting them to be identical.
@betullam
Copy link

betullam commented Mar 5, 2025

I can confirm that for Ubuntu 24.04

@edersohe
Copy link

edersohe commented Mar 7, 2025

In my Linux Mint 22.1 (Based on Ubuntu 24.04) /usr/local/lib/liblzma.so.5 was installed by watchman, causing issues with apt, I fix this issue doing:

# Backup  liblzma.so.5 installed by watchman
sudo mv  /usr/local/lib/liblzma.so.5 $HOME/
# Create a symbolic link with the liblzma.so installed in the distro
sudo ln -s /usr/lib/x86_64-linux-gnu/liblzma.so /usr/local/lib/liblzma.so.5

After that, no issues with watchman and apt

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