Parameter --list doesn't give any libraries?

Hi,

I follow this articles about CLI command:
https://support.plex.tv/articles/201242707-plex-media-scanner-via-command-line

I “define stuff” at the beginning of my session:
“export LD_LIBRARY_PATH=/usr/lib/plexmediaserver”

Then I execute the command to get the id of my libraries:
“/usr/lib/plexmediaserver/‘Plex Media Scanner’ --list”

And it give nothing…

“/usr/lib/plexmediaserver/‘Plex Media Scanner’ -h” give me the help text, so the I got the path right.

I guess the problem is with “export LD_LIBRARY_PATH=/usr/lib/plexmediaserver”, but I don’t know why.

Any idea why I don’t get any ID for my libraries?

Thanks,

Claude Fortier

LD_LIBRARY_PATH and PLEX_MEDIA_SERVER_APLICATION_SUPPORT_DIR must be defined.

Also, the scanner is username sensitive. It runs as user plex

Hi,
Thanks Chuck.

I did the LD_LIBRARY_PATH as explained by the article https://support.plex.tv/articles/201242707-plex-media-scanner-via-command-line/

I try to run de command line as the user plex.

I’ve got this error:
error while loading shared libraries: libboost_atomic.so.1.59.0: cannot open shared object file: No such file or directory

I guess it’s because I did not define PLEX_MEDIA_SERVER_APLICATION_SUPPORT_DIR. What is the command line that will define PLEX_MEDIA_SERVER_APLICATION_SUPPORT_DIR?
The server run on Ubuntu.

Thanks
Claude Fortier

Claude,
On desktop Linux, LD_LIBRARY_PATH is in /usr/llib/plexmediaserver
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR is "/var/lib/plexmediaserver/Library/Application Support"

As example, it’s located differently on QNAP but looks like this.

[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # ls
CrashUploader*	Plex Commercial Skipper*  Plex Media Server Tests*  Plex Transcoder*
lib/		Plex DLNA Server*	  Plex Relay*		    Plex Tuner Service*
Library/	Plex Media Scanner*	  Plex Script Host*	    Resources/
Plex Media Server*	  plex.sh*
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # export LD_LIBRARY_PATH="`pwd`/lib"
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # ./Plex\ Media\ Scanner --list
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library                                                  
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # ./Plex\ Media\ Scanner --list                     
  6: 4K Movies
  2: Channels Movies
  3: Channels TV
  1: Movies
  8: Music
  9: Old Music
  5: Television
  7: Test TV
  4: UHD Movies
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # 

Here, you notice that without PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR defined, it returns nothing. With it defined, it returns the expected results

Hi Chuck,

After few try, and research, I find that:

And this command line worked:

sudo su -l plex -s /bin/bash -c "LD_LIBRARY_PATH=/usr/lib/plexmediaserver PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR='/var/lib/plexmediaserver/Library/Application Support' /usr/lib/plexmediaserver/Plex\ Media\ Scanner --list"

Thanks for your help.

Claude

Yes, both forms of the command are equivalent.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.