Can anyone provide me the step-by-step commands to run Plex Media Scanner from Putty on my Synology DS918+ PMS? I’ve successfully connected to the server via Putty, but need help with the rest of the commands.
I ran these commands that I found in another post, but I believe I’m missing a step or probably dont have the correct syntax…
admin@ds918:/$ cd “/volume1/@appstore/Plex Media Server/”
admin@ds918:/volume1/@appstore/Plex Media Server$ ./Plex\ Media\ Scanner -i
./Plex Media Scanner: error while loading shared libraries: libboost_atomic.so.1.59.0: cannot open shared object file: No such file or directory
admin@ds918:/volume1/@appstore/Plex Media Server$ export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
admin@ds918:/volume1/@appstore/Plex Media Server$ ./Plex\ Media\ Scanner -l
./Plex Media Scanner: error while loading shared libraries: libboost_atomic.so.1.59.0: cannot open shared object file: No such file or directory
Thanks @trumpy81, that got me further than before. But I’m still not doing something right after that. Can you help me get the ‘List’ function to work? Here’s what I tried…
admin@ds918:/$ sudo -su root
sh-4.3# cd ‘/volume1/@appstore/Plex Media Server’
sh-4.3# export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
sh-4.3# ./Plex\ Media\ Scanner -l
./Plex Media Scanner: error while loading shared libraries: libboost_atomic.so.1.59.0: cannot open shared object file: No such file or directory
sh-4.3#
Here is a script you can call, su plex -s bin/sh -c /path/to/script.sh
Amend as appropriate
#!/bin/sh
export LD_LIBRARY_PATH="/var/packages/Plex Media Server/target"
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/volume1/Plex/Library/Application Support"
"/var/packages/Plex Media Server/Plex Media Scanner" ---your command options or `$1-` here---
Thanks @ChuckPa. Forgive my ignorance, I still can’t get the ‘List’ function to work, I’m probably missing something really basic since I’m not experienced with linux commands…
admin@ds918:/$ sudo -su root
Password:
sh-4.3# cd ‘/volume1/@appstore/Plex Media Server’
sh-4.3# #!/bin/sh
sh-4.3# export LD_LIBRARY_PATH="/var/packages/Plex Media Server/target"
sh-4.3# export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/volume1/Plex/Library/Application Support"
sh-4.3# “/var/packages/Plex Media Server/Plex Media Scanner” --list
sh: /var/packages/Plex Media Server/Plex Media Scanner: No such file or directory
Not sure what to do with the script you mentioned, but this is what I got when I ran that command…
sh-4.3# su plex -s bin/sh -c /path/to/script.sh
su: failed to execute bin/sh: No such file or directory
Thanks @trumpy81 and @ChuckPa. Please bear with me as I’m still lost. I’m guessing the script part of @ChuckPa 's suggestion isn’t required just to run the scanner list command, so I’m going to set that aside for now (correct me if I’m wrong).
How do I get the following command to work with the right syntax? do I need to replace the “/var/” part in the command with another folder path? How do I find that folder path?
sh-4.3# “/var/packages/Plex Media Server/Plex Media Scanner” --list
sh: /var/packages/Plex Media Server/Plex Media Scanner: No such file or directory
Thanks!
P.S. I should also mention that I’ve run the scanner list command on a Windows PMS server before, so thats my background. But I’m now running PMS on Syno as you can tell, rather than Windows. But here’s how I used to run the command on windows, and this is all I’m trying to do on the Syno ds918+:
C:\Users\user1>“C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe” --list
1: Movies
5: Photos
4: TV
6: Vault
Good pointer. For those needing similar help, here’s how it worked for me…
admin@ds918:/$ sudo -su root
Password:
sh-4.3# #!/bin/sh
sh-4.3# export LD_LIBRARY_PATH="/var/packages/Plex Media Server/target"
sh-4.3# export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/volume1/Plex/Library/Application Support"
sh-4.3# “/var/packages/Plex Media Server/target/Plex Media Scanner” --list
/var/packages/Plex Media Server/target/Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /var/packages/Plex Media Server/target/libgnsdk_dsp.so.3.07.7)
/var/packages/Plex Media Server/target/Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /var/packages/Plex Media Server/target/libgnsdk_dsp.so.3.07.7)
/var/packages/Plex Media Server/target/Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /var/packages/Plex Media Server/target/libgnsdk_fp.so.3.07.7)
/var/packages/Plex Media Server/target/Plex Media Scanner: /lib/libstdc++.so.6: no version information available (required by /var/packages/Plex Media Server/target/libgnsdk_fp.so.3.07.7)
1: Movies
5: Photos
4: TV
6: Vault
Not sure why it complains about the version, but it returns the List nonetheless.
Synology strips the version and symbol information from the runtime libraries .
The error is harmless.
Be advised, If you cause it to start operations (other than just reading) as root, you will create a file ownership conflict within PMS which will require manual intervention to correct.