I’m getting consistent errors when upgrading Plex. apt will start throwing errors after Plex is installed and the errors are consistent until I remove /var/lib/dpkg/info/plexmediaserver.postinst. apt will continue to throw the error on regular system updates until I remove the file mentioned above.
I’m forcing Plex to run under my user account and have a custom database directory. I think Plex’ postinstall script for Debian-based distributions needs a little help.
edit: beignet error in apt log isn’t a finding. Media server is a first-gen i7 laptop and beignet is only for 3rd gen and later.
apt log:
Preparing to unpack …/plexmediaserver_1.21.0.3616-d87012962_amd64.deb …
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.21.0.3616-d87012962) over (1.20.5.3600-47c0d9038) …
Setting up libdouble-conversion3:amd64 (3.1.5-6.1) …
Setting up plexmediaserver (1.21.0.3616-d87012962) …
PlexMediaServer install: PlexMediaServer-1.21.0.3616-d87012962 - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: Update
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: wizard
PlexMediaServer install: Plex Group: wizard
PlexMediaServer install: Video Group: render
PlexMediaServer install: Metadata Dir: /media/external/plex/Library/Application Support
PlexMediaServer install: Temp Directory: /media/external/temp (set in Preferences.xml)
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Config file used: /etc/systemd/system/plexmediaserver.service.d/override.conf
PlexMediaServer install: Intel QSV Hardware: Not found
PlexMediaServer install:
PlexMediaServer install: OpenCL library: Installed
PlexMediaServer install: Beignet package: Not Installed
PlexMediaServer install:
PlexMediaServer install: WARNING: Package ‘Beignet’, required for hardware transcoding of HDR content, is missing.
PlexMediaServer install: Please install package: ‘beignet-opencl-icd’
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
/bin/mkdir: cannot create directory ‘/var/lib/plexmediaserver’: File exists
dpkg: error processing package plexmediaserver (–configure):
installed plexmediaserver package post-installation script subprocess returned error exit status 1
and here’s my /etc/systemd/system/plexmediaserver.service.d/override.conf:
Plex updates successfully but since the plexmediaserver.postinst is failing it throws an error any time you run updates in apt or aptitude and interferes with another apt tool called “needrestart” which tells me which services need restarting and which applications have stale binaries. if dpkg closes with an error needrestart will not run, so I have to remove /var/lib/dpkg/info/plexmediaserver.postinst to get apt working correctly again.
I recently tried to upgrade to plexmediaserver_1.21.0.3711 with dpkg and something failed in the post installation. As a result, there is a lock preventing apt from running. This is on Ubuntu 20.04.
Is there some information that will tell us if this is the same problem or a new problem?
I am not sure I know how to check the answer to the first question. Are you referring to the unattended-upgrades service? According to the logs, this service ran at 6.17am on 12/3 while the upgrade with dpkg was run at 10:28 am on 12/3.
The upgrade of plex was carried out with the command sudo dpkg -i plexmediaserver_1.21.0.3711-b509cc236_amd64.deb
so yes, it was executed as root.
Since my original post, I killed the dpkg process, removed the lock file /var/lib/dpkg/lock-frontend and ran sudo dpkg --configure -a. This ran and afterwards I will able to use apt to carry out upgrades.
Bullseye is the development codename for Debian 11. It is the current testing distribution. Debian Bullseye Life cycle. Before the release. Release and updates.
I will spin up a Debian 11 VM and see what’s happening but I would think I’d have heard of this by now because every install writes a message to the system log
Specifically, I write:
# Output to log
if [ $Systemd -eq 1 ]; then
echo MESSAGE="$Message" | logger --journald
else
echo "$Message" | logger
fi