Server Version#: 1.28.2.6151-914ddd2b3
Player Version#: -
Server S.O. version: Ubuntu 20.04.5 LTS
During last upgrade I have got the following error message:
# apt install plexmediaserver/public
... (not relevant) ...
PlexMediaServer install: Pre-installation Validation complete.
dpkg: error processing archive /var/cache/apt/archives/plexmediaserver_1.29.0.6244-819d3678c_amd64.deb (--unpack):
new plexmediaserver package pre-installation script subprocess returned error exit status 1
dpkg: error while cleaning up:
installed plexmediaserver package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/plexmediaserver_1.29.0.6244-819d3678c_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
The pre-installation script fails, the procedure ends with the service (PMS) down.
Manually “# service plexmediaserver start” the service starts normally.
Which procedure is better to follow to recover such situation considering PMS is running from years and com.plexapp.plugins.library.db is considered valuable.
Preinstall has successfully run: confirmed
During unpack, when the binaries are deposited in /usr/lib/plexmediaserver is when it fails.
Not in my case: without rebooting, the mentioned log file is not in the / tmp directory, but loocking into journalctl some interesting rows have been written:
Sep 30 10:57:34 ant.zappi.me systemd[1]: plexmediaserver.service: Succeeded.
Sep 30 10:57:34 ant.zappi.me logger[336239]: PlexMediaServer install: File "/etc/systemd/system/plexmediaserver.service" is leftover from an earlier Debian/Ubuntu bug.
Sep 30 10:57:34 ant.zappi.me logger[336245]: PlexMediaServer install: Unit override "/etc/systemd/system/plexmediaserver.service" found.
Sep 30 10:57:34 ant.zappi.me logger[336247]: PlexMediaServer install: Only "/etc/systemd/system/plexmediaserver.service.d/override.conf" is supported.
Sep 30 10:57:34 ant.zappi.me logger[336322]: PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
Removing “/etc/systemd/system/plexmediaserver.service” file and upgrading plexmediaserver again the procedure complete with no errors.
# apt install plexmediaserver
Reading package lists... Done
Building dependency tree
Reading state information... Done
Recommended packages:
beignet-opencl-icd
The following packages will be upgraded:
plexmediaserver
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0 B/84.8 MB of archives.
After this operation, 20.5 kB of additional disk space will be used.
(Reading database ... 214261 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.29.0.6244-819d3678c_amd64.deb ...
Warning: The unit file, source configuration file or drop-ins of plexmediaserver.service changed on disk. Run 'systemctl daemon-reload' to reload units.
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.29.0.6244-819d3678c) over (1.28.2.6151-914ddd2b3) ...
Setting up plexmediaserver (1.29.0.6244-819d3678c) ...
PlexMediaServer install: PlexMediaServer-1.29.0.6244-819d3678c - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: Update
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: video
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /tmp
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Processor: AMD GX-412TC SOC
PlexMediaServer install: Nvidia GPU card: Not Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
PlexMediaServer install: Starting Plex Media Server.
PlexMediaServer install: PlexMediaServer-1.29.0.6244-819d3678c - Installation successful. Errors: 0, Warnings: 0
Processing triggers for mime-support (3.64ubuntu1) ...
Thanks for the tip: you brought me to the solution.