So I recently updated to LibreElec version 9.2 and found my previous Plex server install had been wiped out. I attempted to use the instructions above from escalade and was able to install app.plex with the script provided, but the service would always fail to run.
Error Log: Pastebin
Edit: Resolved by finding and tweaking an alternative version of the plex.service file using more default settings.
Could you please tell what where these settings were? I have the same issue as you
LibreELEC:~/.config/system.d # systemctl start plex
Failed to start plex.service: Unit plex.service has a bad unit file setting.
See system logs and 'systemctl status plex.service' for details.
● plex.service - Plex Media Server
Loaded: bad-setting (Reason: Unit plex.service has a bad unit file setting.)
Active: failed (Result: signal) since Sat 2020-05-30 11:29:03 -05; 34min ago
Main PID: 21801 (code=killed, signal=SEGV)
May 30 11:29:03 LibreELEC systemd[1]: /storage/.config/system.d/plex.service:7: Ignoring unknown escape sequences: "/storage/.cache/app.plex/Plex\ Media\ Serv
May 30 11:29:03 LibreELEC systemd[1]: /storage/.config/system.d/plex.service:7: Executable name contains special characters: /storage/.cache/app.plex/Plex\ Me
May 30 11:29:03 LibreELEC systemd[1]: plex.service: Service RestartSec=100ms expired, scheduling restart.
May 30 11:29:03 LibreELEC systemd[1]: plex.service: Failed to schedule restart job: Unit plex.service has a bad unit file setting.
May 30 11:29:03 LibreELEC systemd[1]: plex.service: Failed with result 'signal'.
Display More
Update 2:
Change the ExecStart line of plex.service to
ExecStart="/storage/.cache/http://app.plex/Plex Media Server"
And started. Later one these logs appear
● plex.service - Plex Media Server
Loaded: loaded (/storage/.config/system.d/plex.service; enabled; vendor preset: disabled)
Active: failed (Result: signal) since Sat 2020-05-30 12:14:23 -05; 2min 18s ago
Process: 852 ExecStartPre=/storage/downloads/plex-update.sh (code=exited, status=0/SUCCESS)
Process: 860 ExecStart=/storage/.cache/app.plex/Plex Media Server (code=killed, signal=SEGV)
Main PID: 860 (code=killed, signal=SEGV)
May 30 12:14:23 LibreELEC systemd[1]: plex.service: Service RestartSec=5s expired, scheduling restart.
May 30 12:14:23 LibreELEC systemd[1]: plex.service: Scheduled restart job, restart counter is at 3.
May 30 12:14:23 LibreELEC systemd[1]: Stopped Plex Media Server.
May 30 12:14:23 LibreELEC systemd[1]: plex.service: Start request repeated too quickly.
May 30 12:14:23 LibreELEC systemd[1]: plex.service: Failed with result 'signal'.
May 30 12:14:23 LibreELEC systemd[1]: Failed to start Plex Media Server.
Display More
Update 3
It seems to be a problem with LibreELEC locales. I installed the locale add-on and changed to en_US.UTF-8. I check then on console
LibreELEC:~/.cache/app.plex # locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Display More
But when I run
LibreELEC:~/.cache/app.plex # locale -a
C
POSIX
It is not there.
The probelm I get when starting the service is:
May 30 13:33:04 LibreELEC systemd[1]: plex.service: Ignoring invalid environment assignment 'export LC_ALL=C': /storage/.config/plex.
May 30 13:33:04 LibreELEC systemd[1]: Started Plex Media Server.
May 30 13:33:04 LibreELEC Plex Media Server[3246]: terminate called after throwing an instance of 'std::runtime_error'
May 30 13:33:04 LibreELEC Plex Media Server[3246]: what(): locale::facet::_S_create_c_locale name not valid
May 30 13:33:04 LibreELEC systemd[1]: plex.service: Main process exited, code=killed, status=6/ABRT
May 30 13:33:04 LibreELEC systemd[1]: plex.service: Failed with result 'signal'.
How do I install this locale?