Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Unable to install PMS 1.7.5 (non container) on Ubuntu

SystemSystem Posts: 208 Plex Employee
This discussion was created from comments split from: Can't install Plex 1.7.5 on Ubuntu 16.04.

Best Answers

Answers

  • nathanglnathangl Members, Plex Pass Posts: 11 Plex Pass

    I'm still having a problem

    Setting up plexmediaserver (1.7.6.4058-8fa494d15) ...
    Usage: usermod [options] LOGIN

    Options:
    -c, --comment COMMENT new value of the GECOS field
    -d, --home HOME_DIR new home directory for the user account
    ....truncated the rest of the usermod help menu.....
    dpkg: error processing package plexmediaserver (--install):
    subprocess installed post-installation script returned error exit status 2
    Errors were encountered while processing:
    plexmediaserve

    on Ubuntu 16.10... doesn't matter if I move udevadm... is this related to the other problem or something new?

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    @nathangl said:
    I'm still having a problem

    Setting up plexmediaserver (1.7.6.4058-8fa494d15) ...
    Usage: usermod [options] LOGIN

    Options:
    -c, --comment COMMENT new value of the GECOS field
    -d, --home HOME_DIR new home directory for the user account
    ....truncated the rest of the usermod help menu.....
    dpkg: error processing package plexmediaserver (--install):
    subprocess installed post-installation script returned error exit status 2
    Errors were encountered while processing:
    plexmediaserve

    on Ubuntu 16.10... doesn't matter if I move udevadm... is this related to the other problem or something new?

    What you're showing doesn't appear to be related to anything done with postinst.

    What has been changed with plex username on your system? Can you please show me grep plex /etc/passwd ; grep plex /etc/group

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • nathanglnathangl Members, Plex Pass Posts: 11 Plex Pass

    plex:x:124:133::/var/lib/plexmediaserver:/bin/bash
    plex:x:133:

    haven't made any changes to the system.. can't figure it out..

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    Thanks for that output.

    You don't have a video group, do you? No graphics adapters?

    [chuck@lizum ~/ubuntu.125]$ grep plex /etc/passwd /etc/group
    /etc/passwd:plex:x:1029:1027:RPM Created PlexUser:/var/lib/plexmediaserver:/sbin/nologin
    /etc/group:video:x:39:plex
    /etc/group:plex:x:1027:
    [chuck@lizum ~/ubuntu.126]$ 
    

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • nathanglnathangl Members, Plex Pass Posts: 11 Plex Pass

    I do..

    video:x:44:nathan

    Tried adding plex but still had the same issues with install..

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    I do not mean to be pedantic but need ask:

    1. Is this a clean Ubuntu 16.10 install or an upgrade?
    2. PMS is still in /var/lib/plexmediaserver ?
    3. Is this in a LXC or Docker ?

    I have tried every way I know to this point short of LXC and docker and cannot replicate the problem hence my questions.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • nathanglnathangl Members, Plex Pass Posts: 11 Plex Pass

    My > @ChuckPA said:

    I do not mean to be pedantic but need ask:

    1. Is this a clean Ubuntu 16.10 install or an upgrade?
    2. PMS is still in /var/lib/plexmediaserver ?
    3. Is this in a LXC or Docker ?

    I have tried every way I know to this point short of LXC and docker and cannot replicate the problem hence my questions.

    No problem. I was incorrect I'm just running 16.04 I was mistaken that I had upgraded. PMS is still in /var/lib/plexmediaserver correct, and there is no LXC/Docker.

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    @nathangl

    There is something VERY strange about your machine. You are running as root when doing this ? (sorry, just being ABSOLUTE pedantic).

    To date, I've not encountered this for anyone unless there is a host-level corruption

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • nathanglnathangl Members, Plex Pass Posts: 11 Plex Pass

    Thanks for splitting into new topic. Secondly, definitely running as root. Yeah I am perplexed by this, all upgrades have always gone smoothly and it was the first time when upgrading to 1.7.5 that I experienced this. On 16.04 LTS as mentioned in the other thread. I haven't changed anything with my system aside from the usual updates...

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    I tried everything I could to replicate your problem. Between my efforts and all the other Ubuntu users who aren't in a Container, you're the first I've seen to have the issue where usermod complains as it does. Usermod works by manipulating the files themselves directly. It's not a complex program.

    One of these two statements in postinst is failing

    [chuck@lizum ~/ubuntu.148]$ grep usermod *
    postinst:     usermod -a -G "$USER" "$USER"
    postinst:     usermod -a -G ${VGROUP} ${PUSER}
    [chuck@lizum ~/ubuntu.149]$ 
    

    Since you don't see this error, we can safely (?) conclude it's not $USER

        if ! getent group "$USER" >/dev/null; then
         groupadd "$USER"
         usermod -a -G "$USER" "$USER"
        fi
    

    Therefore it must be below this point.

    Do you have any of these old files laying around?

    OVERRIDE=/etc/systemd/system/plexmediaserver.service.d/override.conf
    OLDSERVICE=/etc/systemd/system/plexmediaserver.service
    OLDINIT=/etc/default/plexmediaserver
    

    If so, please check for the Plex username. I'm starting to suspect a degenerate case the dev and I didn't plan on. (which is REALLY weird)

    # If the user added a username override we check for that instead of defaulting to user plex
    if [ "`cat /proc/1/comm`" = "systemd" ]; then
      if [ -f $OVERRIDE ]; then
        if [ "`grep "^User=" $OVERRIDE|wc -l`" = "1" ]; then
          PUSER="`grep "^User" $OVERRIDE|cut -d= -f2`"
        fi
      elif [ -f $OLDSERVICE ]; then
        if [ "`grep "^User=" $OLDSERVICE|wc -l`" = "1" ]; then
          PUSER="`grep "^User" $OLDSERVICE|cut -d= -f2`"
        fi
      fi
    elif [ -f $OLDINIT ]; then
      if [ "`grep "^User=" $OLDINIT|wc -l`" = "1" ]; then
        PUSER="`grep "^export PLEX_MEDIA_SERVER_USER=" $OLDINIT|cut -d= -f2`"
      fi
    fi
    
    

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • nathanglnathangl Members, Plex Pass Posts: 11 Plex Pass

    fyi confirmed that setting User=plex in the override file fixes the problem... not sure when the override.conf changed but I know I did not make that change..

  • nathanglnathangl Members, Plex Pass Posts: 11 Plex Pass

    In any case it is much appreciated for your assistance thank you!!!!

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    Please mark the answer and close the thread?

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • bencmeyerbencmeyer Members, Plex Pass Posts: 22 Plex Pass

    @nathangl said:
    Was just going through the postinst script. I have the override.conf file. The logic it follows on my system is as follows:

    it has systemd in /proc/1/comm and the override file exists but this is the structure within it, so the User = returns 3

    Environment=PLEX_MEDIA_SERVER_NewTmp=""
    User=
    new_plex_username
    nathan
    Group=
    new_plex_group
    nathan

    I can see now that the cut -d= -f2 is returning a blank because the username is on the next line... I'm not sure why this error occured but I can only assume if I remove the override file or change the User= to User=plex this should go through successfully?

    I did what Nathan said.

    I simply added plex in front of 'User=' on the same line. Kept everything the same.
    My config did not have anything extra.

    This is what it looks like now, and the install worked.

    Environment=PLEX_MEDIA_SERVER_NewTmp=""
    User=plex
    new_plex_username
    Group=
    new_plex_group

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member
    edited August 8

    @bencmeyer said:

    This is what it looks like now, and the install worked.
    Environment=PLEX_MEDIA_SERVER_NewTmp=""
    User=plex
    new_plex_username <---------- REMOVE THIS .. it will spit errors every time
    Group= <------- FIX This Group=new_group_name_on_same_line
    new_plex_group

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
Sign In or Register to comment.