Plex installation broken via dietpi-software after uninstallation of docker & docker-compose

Yesterday from my dietpi nuc, I uninstall docker & docker-compose & then gave the installation command for plex. all these command via dietpi-software. while installing plex after uninstalling of docker & docker-compose. my screen became blue & dietpi showed me failure in installation of plex. then yesterday also new dietpi update version came 8.8.1. i tried to upgrade to new version. system again hault & showing me error related to plex server. then i tried to install vaultwarden system again fail. so overall i think while removing of docker it made some problem in dietpi system. while screen was blue it ask me to upload bug report for dietpi & i have upload it (- Reference code: b3f2ff77-55e8-4754-a90f-b01ffbeb581c ) and cut/paste logs are as in below file.

https://dpaste.org/p15oF

I am confirm dietpi machine is working & i am able to access it via ssh from remote machine also, that machine able to send me notifications via pushover. so dietpi machine having access to external/internal LAN & internet access.

---------------------------------------------------------------------

---------------------------------------------------------------------
- DietPi has encountered an error                                   -
- Please create a ticket: https://github.com/MichaIng/DietPi/issues -
- Copy and paste only the BLUE lines below into the ticket          -
---------------------------------------------------------------------
#### Details:
- Date           | Mon Aug 29 08:24:00 MDT 2022
- DietPi version | v8.7.1 (MichaIng/master)
- Image creator  | plex
- Pre-image      | plex
- Hardware       | Native PC (x86_64) (ID=21)
- Kernel version | `Linux DietPi 5.10.0-17-amd64 #1 SMP Debian 5.10.136-1 (2022-08-13) x86_64 GNU/Linux`
- Distro         | bullseye (ID=6)
- Command        | `apt-get -y upgrade`
- Exit code      | 100
- Software title | DietPi-Update
#### Steps to reproduce:
<!-- Explain how to reproduce the issue -->
1. ...
2. ...
#### Expected behaviour:
<!-- What SHOULD happen? -->
- ...
#### Actual behaviour:
<!-- What IS happening? -->
- ...
#### Extra details:
<!-- Please post any extra details that might help solve the issue -->
- ...
#### Additional logs:

Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up plexmediaserver (1.28.1.6104-788f82488) ...
dpkg: error processing package plexmediaserver (--configure):
 installed plexmediaserver package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 plexmediaserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
---------------------------------------------------------------------
root@DietPi:~# apt-get -y update
Hit:1 https://downloads.plex.tv/repo/deb public InRelease
Hit:2 https://deb.debian.org/debian-security bullseye-security InRelease
Hit:3 https://ftp.debian.org/debian bullseye InRelease
Hit:4 https://ftp.debian.org/debian bullseye-updates InRelease
Hit:5 https://ftp.debian.org/debian bullseye-backports InRelease
Reading package lists... Done
root@DietPi:~# apt-get -y upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up plexmediaserver (1.28.1.6104-788f82488) ...
dpkg: error processing package plexmediaserver (--configure):
 installed plexmediaserver package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 plexmediaserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DietPi:~#

Issue is with the Plex installation. Could you try to purge the Plex

apt purge plexmediaserver

Thanks, I gave these commands in serial order

  • apt purge plexmediaserver (works fine)
  • dietpi-update (work fine)
  • sudo reboot (work fine)
  • dietpi-software install 42 (again fail)
    so plex installation having some trouble.
 APT install for: plexmediaserver
│  - Command: apt-get -y --allow-change-held-packages install plexmediaserver
│  - Exit code: 100
│  - DietPi version: v8.8.1 (MichaIng/master) | HW_MODEL: 21 | HW_ARCH: 10 | DISTRO: 6
│  - Image creator: plex
│  - Pre-image: plex
│  - Error log:
│ Reading package lists...
│ Building dependency tree...
│ Reading state information...
│ plexmediaserver is already the newest version (1.28.1.6104-788f82488).
│ 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
│ 1 not fully installed or removed.
│ After this operation, 0 B of additional disk space will be used.
│ Setting up plexmediaserver (1.28.1.6104-788f82488) ...^M
│ PlexMediaServer install: PlexMediaServer-1.28.1.6104-788f82488 - Installation starting.^M
│ PlexMediaServer install: ^M
│ PlexMediaServer install: Now installing based on:^M
│ PlexMediaServer install:   Installation Type:   New^M
│ PlexMediaServer install:   Process Control:     systemd^M
│ PlexMediaServer install:   Plex User:           plex^M
│ PlexMediaServer install:   Plex Group:          plex^M
│ PlexMediaServer install:   Video Group:         render^M
│ PlexMediaServer install:   Metadata Dir:        /var/lib/plexmediaserver/Library/Application Support^M
│ PlexMediaServer install:   Temp Directory:      /tmp ^M                    Native PC (x86_64) | IP: 192.168.1.90 | Use up/down buttons to scroll text──────────────│ PlexMediaServer install:   Lang Encoding:       en_US.UTF-8^M
│ PlexMediaServer install:   Processor:           Intel(R) Celeron(R) CPU  J1900  @ 1.99GHz^M
│ PlexMediaServer install:   Intel i915 Hardware: Found^M
│ PlexMediaServer install:   Nvidia GPU card:     Not Found^M
│ PlexMediaServer install:  ^M
│ PlexMediaServer install: Completing final configuration.^M
│ useradd: group plex exists - if you want to add this user to that group, use -g.^M
│ PlexMediaServer install: ERROR: Cannot create user "plex".  Error:  0^M
│ groups: ‘plex’: no such user^M
│ usermod: user 'plex' does not exist^M
│ PlexMediaServer install: ERROR: Cannot add 'plex' to video group 'render'. Error:  0^M
│ usermod: user 'plex' does not exist^M
│ PlexMediaServer install: WARNING:  Could not add 'plex' to video group 'video'.  Error  0^M
│ PlexMediaServer install: Plex Media Server: ver PlexMediaServer-1.28.1.6104-788f82488 - Installation failed. Final
│ configuration not performed.^M

PlexMediaServer install: WARNING:  Could not add 'plex' to video group 'video'.  Error  0^M
│ PlexMediaServer install: Plex Media Server: ver PlexMediaServer-1.28.1.6104-788f82488 - Installation failed. Final
│ configuration not performed.^M
│ PlexMediaServer install: Assistance is available in our Support Forums.^M
│ PlexMediaServer install: both^M
│ dpkg: error processing package plexmediaserver (--configure):^M
│  installed plexmediaserver package post-installation script subprocess returned error exit status 255^M
│ Errors were encountered while processing:^M
│  plexmediaserver^M
│ E: Sub-process /usr/bin/dpkg returned an error code (1)

ok Plex is having issues to create the plex user group as it’s already existing. Let’s try following

apt purge plexmediaserver
groupdel plex
dietpi-software install 42

Thanks Joulinar, your given commands works & system able to install plex. & everything as per expectation

apt purge plexmediaserver
groupdel plex
dietpi-software install 42

ok good. I submit a fix already v8.9 by Joulinar · Pull Request #5723 · MichaIng/DietPi · GitHub

Fix merged, many thanks for reporting. That the Plex package install fails when the plex group exists already is something we should probably report to Plex devs. This would be the case as well if one adds another user to this group (the common use case/reason for system groups to exist) and then remove the package.