Server Version#:1.26.2.5797 → cannot upgrade to 1.27.2.5929
Player Version#: N/A
I am in dpkg hell - have tried so many “solutions” and still stuck.
Error:
PlexMediaServer install: Pre-installation Validation complete. Errors: 0, Warnings: 1
dpkg: error processing archive /var/cache/apt/archives/plexmediaserver_1.27.2.5929-a806c5905_amd64.deb (–unpack):
new plexmediaserver package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/plexmediaserver_1.27.2.5929-a806c5905_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
What have I tried:
sudo dpkg --configure -a
sudo apt install -f
I even edited the dpkg status list:
sudo nano /var/lib/dpkg/status
Plex entries:
Package: plexmediaserver
Status: install ok not-installed
Priority: optional
Section: video
Architecture: amd64
I have changed the second line to:
Status: install ok installed
Because it is installed and running
I really don’t want to reinstall Plex, and rebuild the database - there is a lot of music on it and it took me a great deal of time to get all the albums correct in the database
The version I have runs just fine, but I would like to receive the updated functionality when it arrives.
Anyone having a pointer to what I should be doing next?
I folowed the instructions - note that plexmediaserver.preinst would not run, but there was an executable named preinst… so I ran sudo ./preinst
Here is the output
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Systemd configuration error detected:
PlexMediaServer install: File “/etc/systemd/system/plexmediaserver.service” is leftover from an earlier Debian/Ubuntu bug.
PlexMediaServer install: Please transfer any customizations (APP_DIR, User, Group, TMPDIR, and/or UMask) to a proper “/override.conf”
PlexMediaServer install: and reinstall.
PlexMediaServer install: Unit override “/etc/systemd/system/plexmediaserver.service” found.
PlexMediaServer install: Only “/etc/systemd/system/plexmediaserver.service.d/override.conf” is supported.
PlexMediaServer install: Warning: “/var/lib/plexmediaserver/Library/Application Support” isn’t owned by “plex”, UID: 998. Found “matt”, UID: 1000 instead. Continuing.
PlexMediaServer install:
PlexMediaServer install: Pre-installation Validation failed.
PlexMediaServer install: Configuration information discovered:
PlexMediaServer install: Installation Type: Update
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: render
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /dev/shm (set in Preferences.xml)
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Processor: i7-6700
PlexMediaServer install: Intel i915 Hardware: Found
PlexMediaServer install: Nvidia GPU card: Not Found
PlexMediaServer install:
PlexMediaServer install: Pre-installation Validation complete. Errors: 0, Warnings: 1
Could this line: “/var/lib/plexmediaserver/Library/Application Support” isn’t owned by “plex”, UID: 998. Found “matt”, UID: 1000 instead. Continuing." be the culprit?
PlexMediaServer install: Systemd configuration error detected:
PlexMediaServer install: File “/etc/systemd/system/plexmediaserver.service” is leftover from an earlier Debian/Ubuntu bug.
PlexMediaServer install: Please transfer any customizations (APP_DIR, User, Group, TMPDIR, and/or UMask) to a proper “/override.conf”
PlexMediaServer install: and reinstall.
You have the Unit Override file in /etc/systemd. I can’t support that because it conflicts with /lib/systemd/system/plexmediaserver.service.
What I do support is the official Service Override in /etc/systemd/system/plexmediaserver.service.d/override.conf
The installer message is telling you what to do – Take your customization variables and put them in a proper override.conf then delete the full unit override.
/etc/systemd/system/plexmediaserver.service is either left over from a non-upgraded PMS installation for Ubuntu 16
-OR-
“Inexperienced hands” unwittingly following some “Internet Expert’s” advice ,
Here’s how we fix this. (You’ll laugh)
sudo bash
systemctl stop plexmediaserver (it should already be stopped)
rm /etc/systemd/system/plexmediaserver.service <- this is the No-No
mkdir /etc/systemd/system/plexmediaserver.service.d
Now, using your favorite text editor (I like gedit or vi), and still in sudo bash mode,
The unwitting hands strike again… but this time guided by someone who actually knows what he is doing…
SUCCESS!
I did need to update /var/lib/dpkg/status file to include Version and Description in the plexmediaserver entry - once that was done, the program update completed without a hitch.
As for the customisation - think when I just installed it, I may have (read: had - as nobody else would have) given ownership to me - unwitting fingers and all…
Thanks a bunch @ChuckPa ! I am really grateful for your persistence in solving this puzzle.
I hope this trail is useful to others with the same issue.