I am trying to run a fairly basic post-processing script that would transcode a DVR recording using HandbrakeCLI (I am using the nightlies repository on Ubuntu 17.10 64). I am getting the following error messages:
Jan 9 11:30:01 [user] sh[950]: HandBrakeCLI: /usr/lib/plexmediaserver/libxml2.so.2: no version information available (required by HandBrakeCLI)
Jan 9 11:30:01 [user] sh[950]: HandBrakeCLI: /usr/lib/plexmediaserver/libxml2.so.2: no version information available (required by HandBrakeCLI)
Jan 9 11:30:01 [user] sh[950]: HandBrakeCLI: /usr/lib/plexmediaserver/libz.so.1: version `ZLIB_1.2.9’ not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
There are two versions of each of these files, one in the usual standalone location and one in /usr/lib/plexmediaserver. I don’t want to remove the plex version and link to the other (one solution proposed for this kind of error generally), since I am afraid I will break Plex if I do so. I would like to be able to force HandBrakeCLI to use the default versions of these libraries, but have not yet found anything online addressing this. Has anyone encountered a similar path issue in post-processing, and if so how did you fix it?
I seem to have answered my own question with a bit more googling and trial and error - the solution to the HandBrakeCLI errors was to add a line before the HandBrakeCLI command that changed the library path environment variable to remove /usr/lib/plexmediaserver; after the Handbrake command completes, the script then restores the prior library path variable (not sure that was necessary, but just in case):