Plex service setting LD_LIBRARY_PATH= /usr/lib/plexmediaserver globally?

I upgraded my Plex server to 1.1.4 and noticed a few things stopped working on my machine. Curl and CouchPotato for example. It seems that the Plex service is setting LD_LIBRARY_PATH to /usr/lib/plexmediaserver globally and the custom libs there aren’t friendly. The service is running as user plex.

Any idea what I’m doing wrong here? Is this a bug?

Ubuntu 14.04
plexmediaserver_1.1.4.2757-24ffd60_amd64.deb
Upgrade from 0.9.16.3.1840-cece46d

Define ‘globally’.

PMS executes:

export LD_LIBRARY_PATH="/usr/lib/plexmediaserver:${LD_LIBRARY_PATH}" immediately prior to launching “Plex Media Server” (the process).

This is not a global definition. This is set in the process’s environment and inherited by all processes spawned below it only.

When I ssh in as root or any other user besides the plex user and echo $LD_LIBRARY_PATH I get /usr/lib/plexmediaserver since the upgrade.

Looking at the process it’s running as plex

How did you do the upgrade? which username? Please give as much detail as you can. What you describe doesn’t happen under normal circumstances otherwise it would be a big problem. Let’s figure out what’s unique to your system/configuration and what didn’t go right . then fix it

Also, can you please show me your /etc/defaults/plexmediaserver (or PlexMediaServer) file?

What username do your other programs run as?

I discovered LD_LIBRARY_PATH=/usr/lib/plexmediaserver/ in etc/environment which is global. I removed it, plex is happy and I don’t have the issue anymore.

I installed plex again as root and it didn’t add it back. So this is on me.

Thanks for the help

@Grobinson said:
I discovered LD_LIBRARY_PATH=/usr/lib/plexmediaserver/ in etc/environment which is global. I removed it, plex is happy and I don’t have the issue anymore.

I installed plex again as root and it didn’t add it back. So this is on me.

Thanks for the help

I’m glad you found it. NO PMS installer has ever put it there. Everything PMS does write goes in its startup script or upstart job or systemd service file. . I do ask you to keep an eye on it.

2 years later, I have still the same problem.
export LD_LIBRARY_PATH="/usr/lib/plexmediaserver:${LD_LIBRARY_PATH}" seems to do nothing in bash file
if I do it in terminal /usr/lib/plexmediaserver is used as LD_LIBRARY_PATH location so most other software like vim are broken and --list command still not work…

  1. Run the scanner as user plex
  2. export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR to the path of your installation
  3. export LD_LIBRARY_PATH as you show above.

The scanner is **username sensitive (permissions) and requires the path to your metadata.

PMS has no involvment with your vim being broken. I strongly suggest you consider a fresh OS install.

Since this thread is otherwise over 90 days old, closing it again.