Cannot run Plex Media Scanner from the command line

Hi,

I’m trying to refresh my media index files using Plex Media Scanner from the command line. I’ve got a QNAP installation so I SSH onto the NAS and issue the following commands:
cd /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer Plex\ Media\ Scanner -h -sh: Plex Media Scanner: command not found

Curiously, if I change up a directory I get a different error:
cd .. PlexMediaServer/Plex\ Media\ Scanner -h PlexMediaServer/Plex Media Scanner: error while loading shared libraries: libboost_atomic.so.1.59.0: cannot open shared object file: No such file or directory

What am I doing wrong?

Set the LD_PRELOAD_LIBRARY with your Plex Server directory.
Google is your friend.

ciao

luigi

With the first one, likely you don’t have . in your path. If you want to execute a program in the current directory, it is typically advisable to run ./commandHere rather than commandHere.

I’m not sure if it is different on qnap, but usually it is something along the lines of:

LD_LIBRARY_PATH=/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex\ Media\ Scanner

(I changed the paths above to match where yours seems to be installed. Hopefully it is correct.)

Thanks everyone, sorry for being such a Linux noob!
In case other people come here looking for the answer, what worked for me was:

$ export LD_LIBRARY_PATH=/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer
$ export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library
$ ./Plex\ Media\ Scanner -h