# \[server-linux\] dpkg errors when updating plex?

**URL:** <https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [November 25, 2020, 5:06pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518 "2020-11-25T17:06:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![wizard10000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/wizard10000/32/88585_2.png) [@wizard10000](https://forums.plex.tv/u/wizard10000)\
**Post date:** [November 25, 2020, 5:06pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/1 "2020-11-25T17:06:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [November 25, 2020, 5:34pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/2 "2020-11-25T17:34:54Z")

</div>

Excuse me, which version is this?

> [@wizard10000](#):
>
> OS: Debian Unstable

Show me the output of `/tmp/plexinstaller.log`

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

---

<div class="post-metadata">

**Author:** ![wizard10000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/wizard10000/32/88585_2.png) [@wizard10000](https://forums.plex.tv/u/wizard10000)\
**Post date:** [November 25, 2020, 7:03pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/3 "2020-11-25T19:03:34Z")

</div>

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 -

---

<div class="post-metadata">

**Author:** ![TeknoJunky](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/teknojunky/32/165055_2.png) [@TeknoJunky](https://forums.plex.tv/u/TeknoJunky)\
**Post date:** [November 25, 2020, 7:07pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/4 "2020-11-25T19:07:41Z")

</div>

bullseye/sid is the current debian unstable.

ie debian 11

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [November 26, 2020, 4:36am UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/5 "2020-11-26T04:36:45Z")

</div>

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 🤣

---

<div class="post-metadata">

**Author:** ![rbrown](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@rbrown](https://forums.plex.tv/u/rbrown)\
**Post date:** [December 4, 2020, 3:36pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/6 "2020-12-04T15:36:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [December 4, 2020, 4:00pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/7 "2020-12-04T16:00:09Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![rbrown](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@rbrown](https://forums.plex.tv/u/rbrown)\
**Post date:** [December 4, 2020, 7:20pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/9 "2020-12-04T19:20:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [December 4, 2020, 7:42pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/10 "2020-12-04T19:42:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mickeygoldsmith](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@mickeygoldsmith](https://forums.plex.tv/u/mickeygoldsmith)\
**Post date:** [February 17, 2021, 4:30pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/12 "2021-02-17T16:30:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 17, 2021, 4:41pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/13 "2021-02-17T16:41:04Z")

</div>

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

> [@mickeygoldsmith](#):
>
> logger: socket /dev/log: Connection refused

Nothing we can do but wait

---

<div class="post-metadata">

**Author:** ![mickeygoldsmith](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@mickeygoldsmith](https://forums.plex.tv/u/mickeygoldsmith)\
**Post date:** [February 17, 2021, 4:44pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/14 "2021-02-17T16:44:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 17, 2021, 6:51pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/15 "2021-02-17T18:51:32Z")

</div>

This information is outdated?

 ![Screenshot from 2021-02-17 13-45-07](https://global.discourse-cdn.com/plex/original/3X/6/7/67802a1f48757e09620b55109d17aa785d23b95b.png)

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:

```auto
  # Output to log
  if [$Systemd -eq 1]; then
    echo MESSAGE="$Message" | logger --journald
  else
    echo "$Message" | logger
  fi

```

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 17, 2021, 6:56pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/16 "2021-02-17T18:56:57Z")

</div>

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

> **[Downloading Debian USB/CD/DVD images via HTTP/FTP](https://www.debian.org/CD/http-ftp/#stable)**

The “Stable” netinst takes me to

 ![Screenshot from 2021-02-17 13-56-13](https://global.discourse-cdn.com/plex/original/3X/f/9/f9ba04fd05858d72880ebadf6a435270f8752589.png)

Takes me to:

[https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso](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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [May 18, 2021, 6:57pm UTC](https://forums.plex.tv/t/server-linux-dpkg-errors-when-updating-plex/657518/17 "2021-05-18T18:57:48Z")

</div>

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