mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored #7290
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gzowner on GitHub (Aug 30, 2025).
Description of the bug
Aug 29 17:55:37 s557 jellyfin[41556]: ERROR: ld.so: object '/usr/lib/jellyfin/libjemalloc.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Reproduction steps
1) Install jemalloc
sudo apt-get update
sudo apt-get install -y libjemalloc2
2) Point LD_PRELOAD to the real library path (Ubuntu puts it here)
sudo systemctl edit jellyfin
Paste this into the editor that opens, then save/exit:
ini
Copy code
[Service]
Environment="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2"
What is the current bug behavior?
Slow responding
What is the expected correct behavior?
Application to restart and start as needed?
Jellyfin Server version
Unstable
Specify commit id
No response
Specify unstable release number
No response
Specify version number
No response
Specify the build version
10.11.0-rc5
Environment
Jellyfin logs
FFmpeg logs
Client / Browser logs
No response
Relevant screenshots or videos
No response
Additional information
Solution
Point the expected path to the actual lib on Ubuntu/Debian
sudo mkdir -p /usr/lib/jellyfin
sudo ln -sf /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 /usr/lib/jellyfin/libjemalloc.so
Restart and check logs
sudo systemctl restart jellyfin
journalctl -u jellyfin -n 50 --no-pager
@gnattu commented on GitHub (Aug 30, 2025):
The default env file is defined in /etc/default/jellyfin which is also sourced by the systemd unit.
Current unstable packaging should automatically install libjemalloc iirc and you should not have to modify anything:
50c398a503/debian/jellyfin-server.postinst (L53)Can you explain more in detail why you have to install jemalloc manually and why the post install script does the automatic linking does not work for you?
@gzowner commented on GitHub (Aug 30, 2025):
Did the normal install of the RC5. Check logs and that is the error.
Deleted and reinstalled and same errors. So did the work around and things
working just fine now.
On Fri, Aug 29, 2025, 11:47 PM gnattu @.***> wrote:
@evert commented on GitHub (Oct 6, 2025):
I also have this error on a fresh Debian install.
my
/etc/default/jellyfinpoints to:The
/usr/lib/jellyfindirectory only has abinsubdirectory and nothing else.@joshuaboniface commented on GitHub (Oct 7, 2025):
So we're having to do some automagic in the Debian packaging config to find the real libjemalloc file (thanks to differences between Debian and Ubuntu and between versions of each) and then linking it into
/usr/lib/jellyfin, like so:It seems like this isn't being found on either of your systems.
libjemalloc2is definitely configured as aDependsforjellyfin-server, so you shouldn't have a successful install without the package:Can you post your original installation
aptlogs, as well as the output of[sudo] ldconfig -p | grep libjemalloc?@joshuaboniface commented on GitHub (Oct 7, 2025):
I also have a hunch - were your installs done using
dpkg -i *.debfollowed byapt -f install? That sequence - which to be fair is what we had documented - would indeed cause this exact problem sincelibjemalloc2wouldn't be found during thepostinstrun forjellyfin-server, and the symlink we expect wouldn't get created later when the dep is installed byapt -f install. In any case we've updated our docs to reflect best-practices and avoid this potential problem.@joshuaboniface commented on GitHub (Oct 8, 2025):
Reopening until confirmation.
@evert commented on GitHub (Oct 8, 2025):
For a bit more context, I took a look at my
.zsh_historyand installed jellyfin with:Jellyfin failed to start and I ended up running this to get it going:
Then I saw the libjemalloc error and ran:
I'm not sure if this library was already installed, or if it just got marked as manually installed at this point. After, I fixed the error with:
Is it possible that a missing
libicu76could have caused thepostinstto fail? I no longer have the logs and can't reproduce on my running system unfortunately@evert commented on GitHub (Oct 8, 2025):
Full journalctl log of that day:
@joshuaboniface commented on GitHub (Oct 8, 2025):
Thanks @evert that seems to rule out the potential manual
dpkgissue. Can you also provide the/var/log/apt/logs (history.logandterm.log) for that same period? They may have rotated and be compressed (.X.gzextensions).@evert commented on GitHub (Oct 9, 2025):
history.log:
term.log:
Also nice to know these exist! TIL
@joshuaboniface commented on GitHub (Oct 9, 2025):
Huh well the plot definitely thickens there. It definitely installed
libjemalloc2, and configured it beforejellyfin-serveras expected. I'm curious what's your output of:@evert commented on GitHub (Oct 9, 2025):
There ya go:
And yeah this Debian is almost as stock as it gets. Fresh install from debian 13. Minimal OS
@MichaIng commented on GitHub (Oct 20, 2025):
If it is a dependency for the DEB package anyway, why not link it properly in the binary instead of preloading it? It could then find the library on the default path.
This symlink generation in postinst does not work reliably, the condition in postinst failed on a test install of the
jellyfinpackage on Debian, even that thelibjemalloc2package was installed and unpacked as dependency already. Maybe someldconfigcall is needed beforeldconfig -p, to assure the cache is updated in case of a freshly installed library.@RichardPointon commented on GitHub (Oct 21, 2025):
I've just upgraded to 10.11 and seen the same issue. Addling the missing symlink was all that was required to fix the issue. Im running ubuntu 24.04.3 LTS server