CRITICAL : build and install from source breaks Debian flavoured Linux
- Dominant language
- C++
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
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](https://forums.linuxmint.com/viewtopic.php?t=436696) 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`
1. Guessing that it might have been an install from source that put it there
1. Searching `$HOME` for files that were modded that day
1. Seeing the `watchman` folder
1. Finding a `liblzma.so.5` file in the build outputs timestamped 6 minutes before the offending lib
1. Comparing the `sha1sum` of both files and noting them to be identical.
Contributor guide
Assessment
This issue has not been assessed yet.