[server-linux] dpkg errors when updating plex?

Server Version#: 1.21.0.3616

OS: Debian Unstable

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:

[Service]
Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/media/external/plex/Library/Application Support”
User=wizard
Group=wizard

Excuse me, which version is this?

Show me the output of /tmp/plexinstaller.log

Are you trying to run as a non-root user?

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.

This makes sense?

cheers -

bullseye/sid is the current debian unstable.

ie debian 11

I am sorry but I’m not going to try and hit a moving target.

It is working for everyone else.

Besides, I am sufficiently unstable myself without working on a distro under development :rofl:

1 Like

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?

@rbrown

Can you shed some more information please?

  1. Was the normal update service running when you attempted to install?
    It holds the same lock file as dpkg to prevent corruption of the dkpg database.

  2. Were you root at the time?

  1. 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.

  2. 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.

@rbrown

Thanks for detailing.

Something/somehow your dpkg left itself in a locked state. I never understood how that can happen but it does.

If everything cleared through and it didn’t specifically call out the Plex DEB file then we’re good.

You can install the existing on top of what’s already there as a double-check if you like to make sure it’s in a known-good state.

I just upgraded to bullseye, and am getting the following errors:

sudo dpkg -i plexmediaserver_1.21.3.4046-3c1c83ba4_armhf.deb
(Reading database … 113576 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.21.3.4046-3c1c83ba4_armhf.deb …
PlexMediaServer install: Pre-installation Validation.
logger: socket /dev/log: Connection refused
dpkg: error processing archive plexmediaserver_1.21.3.4046-3c1c83ba4_armhf.deb (–install):
new plexmediaserver package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
plexmediaserver_1.21.3.4046-3c1c83ba4_armhf.deb

Any suggestions?

  1. Non-production OS distro

Bullseye is the development codename for Debian 11. It is the current testing distribution. Debian Bullseye Life cycle. Before the release. Release and updates.

  1. Internal error

Nothing we can do but wait

This is the current raspbian version…its no longer in testing…

This information is outdated?

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

I do not see where this is stable yet. Please advise.

The “Stable” netinst takes me to

Takes me to:

https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso

10.8 is release status.
11 is not.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.