Revamped README: Added patchelf installation, mentioned static builds for Docker, and removed outdated links.

This commit is contained in:
yuv420p10le 2024-06-15 22:59:55 +03:00
parent 87a6614a6c
commit edfc96ae60

View File

@ -16,9 +16,11 @@ Note: x86-64 only. If your Plex Media Server is in "Program Files (x86)", it's a
x86-64 only.
First, install `patchelf` from your distribution's package manager or `pip`:
### Native
```bash
Install `patchelf`. Can be done either via `pip` or your distribution's package manager.
```sh
sudo apt update && sudo apt install patchelf # Debian/Ubuntu/etc
sudo pacman -S patchelf # Arch
sudo yum install patchelf # Fedora/RHEL/Centos/Rocky/OpenSUSE/etc
@ -26,10 +28,6 @@ sudo apk update && apk add --upgrade patchelf # Alpine
sudo pip install patchelf # pip; you might need --break-system-packages if installing if you're on an externally managed environment
```
And then:
### Native
The script assumes Plex Media Server is currently running.
Run the following command:
@ -44,6 +42,21 @@ For persistance with Plex updates, create the above as a bash script (run as roo
### Docker
First, install a static build of `patchelf`:
```bash
sudo pip install patchelf # pip; you might need --break-system-packages if installing if you're on an externally managed environment
# Install from provided binaries
wget https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-x86_64.tar.gz -O /tmp/patchelf.tar.gz && \
mkdir /tmp/patchelf && \
tar -xvzf /tmp/patchelf.tar.gz -C /tmp/patchelf && \
sudo cp -r /tmp/patchelf/ / && \
rm -rf /tmp/patchelf
```
Installing `patchelf` from your distribution's package manager will provide you with a dynamically linked binary, which may fail if your Docker image has a too old version of glibc/glibcxx. You can try going with that approach, but do not ask for support if it doesn't work.
Tested on [linuxserver/docker-plex](https://github.com/linuxserver/docker-plex), but should work for all Docker setups.
The script assumes Plex Media Server is currently running, that you have a mounted `/config` volume in the container, and that your container is named `plex`.
@ -60,12 +73,6 @@ Your Plex Media Server should now be restarted with all features unlocked.
This will NOT persist through Docker image updates, as rebuilding the container will copy libraries freshly from the image.
Setup the above commands as a script for an easy installation, and optionally, set it as a cronjob to run daily.
### Other configurations
- For an UNRAID (x86-64) setup guide, [check Mizz141's gist](https://gist.github.com/mizz141/608d21fbc2fe4480286c76cc421f40d3).
- For binary patching for Windows/Linux (x86-64/ARM64) instead of DLL sideloading/import hijacking, [check edde746's fork](https://github.com/edde746/plexmediaserver_crack).
### Building
#### Windows