# Exit Code 127 on raspberry pi

**URL:** https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769
**Category:** Apps & Creations
**Tags:** server-linux-arm
**Created:** [February 8, 2018, 10:54pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769 "2018-02-08T22:54:24Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![cooltop101](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@cooltop101](https://forums.plex.tv/u/cooltop101)
#### Post date: [February 8, 2018, 10:54pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/1 "2018-02-08T22:54:24Z")

</div>

So I followed this guide [here](https://thepi.io/how-to-set-up-a-raspberry-pi-plex-server/ "https://thepi.io/how-to-set-up-a-raspberry-pi-plex-server/") and it went surprisingly smoothly, there were no errors while installing anything. When I restarted my Pi, I entered the IP followed by the plex port and everything, and nothing popped up, after googling I discovered the Plex server wasn’t starting and said exit code 127, I tried doing more googling but nothing I found was able to work

---

<div class="post-metadata">

### Author: ![drmagoo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drmagoo/32/13982_2.png) [@drmagoo](https://forums.plex.tv/u/drmagoo)
#### Post date: [February 9, 2018, 8:41am UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/2 "2018-02-09T08:41:58Z")

</div>

> @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> So I followed this guide [here](https://thepi.io/how-to-set-up-a-raspberry-pi-plex-server/ "https://thepi.io/how-to-set-up-a-raspberry-pi-plex-server/") and it went surprisingly smoothly, there were no errors while installing anything. When I restarted my Pi, I entered the IP followed by the plex port and everything, and nothing popped up, after googling I discovered the Plex server wasn’t starting and said exit code 127, I tried doing more googling but nothing I found was able to work

The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.

---

<div class="post-metadata">

### Author: ![cooltop101](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@cooltop101](https://forums.plex.tv/u/cooltop101)
#### Post date: [February 9, 2018, 9:07pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/3 "2018-02-09T21:07:52Z")

</div>

> @uglymagoo said:
> 
> > @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> > So I followed this guide [here](https://thepi.io/how-to-set-up-a-raspberry-pi-plex-server/ "https://thepi.io/how-to-set-up-a-raspberry-pi-plex-server/") and it went surprisingly smoothly, there were no errors while installing anything. When I restarted my Pi, I entered the IP followed by the plex port and everything, and nothing popped up, after googling I discovered the Plex server wasn’t starting and said exit code 127, I tried doing more googling but nothing I found was able to work
> 
> The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.  
> I should specify that I was using a RPi 2, but I also have a RPi 3

---

<div class="post-metadata">

### Author: ![drmagoo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drmagoo/32/13982_2.png) [@drmagoo](https://forums.plex.tv/u/drmagoo)
#### Post date: [February 10, 2018, 11:01pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/4 "2018-02-10T23:01:37Z")

</div>

> @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:
> 
> > The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.  
> > I should specify that I was using a RPi 2, but I also have a RPi 3

Please post the output of `uname -a` on your RPi 2 to make sure it’s really a RPi 2. Confusing a RPi Model B with a RPi 2 is the most common mistake here.

Also please post the output of `journalctl -u plexmediaserver`. If it’s really a RPi 2 it’s something you did during trying to install Plex and we have to figure out what went wrong.

Additionally, the guide you used is wrong in some aspects  
(1) Editing `/etc/default/plexmediaserver.prev` just does nothing. I have no idea why the authors would think this is the correct file 😃  
(2) Do not try to run Plex as user `pi` but just leave it as `plex`

---

<div class="post-metadata">

### Author: ![cooltop101](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@cooltop101](https://forums.plex.tv/u/cooltop101)
#### Post date: [February 11, 2018, 3:18am UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/5 "2018-02-11T03:18:36Z")

</div>

> @uglymagoo said:
> 
> > @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:
> > 
> > > The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.  
> > > I should specify that I was using a RPi 2, but I also have a RPi 3
> 
> Please post the output of `uname -a` on your RPi 2 to make sure it’s really a RPi 2. Confusing a RPi Model B with a RPi 2 is the most common mistake here.
> 
> Also please post the output of `journalctl -u plexmediaserver`. If it’s really a RPi 2 it’s something you did during trying to install Plex and we have to figure out what went wrong.
> 
> Additionally, the guide you used is wrong in some aspects  
> (1) Editing `/etc/default/plexmediaserver.prev` just does nothing. I have no idea why the authors would think this is the correct file 😃  
> (2) Do not try to run Plex as user `pi` but just leave it as `plex`

> @uglymagoo said:
> 
> > @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:
> > 
> > > The armv6 Raspberry Pi is not supported, only the armv7 successors RPi 2 and 3. There is just no armv6 build of Plex available.  
> > > I should specify that I was using a RPi 2, but I also have a RPi 3
> 
> Please post the output of `uname -a` on your RPi 2 to make sure it’s really a RPi 2. Confusing a RPi Model B with a RPi 2 is the most common mistake here.
> 
> Also please post the output of `journalctl -u plexmediaserver`. If it’s really a RPi 2 it’s something you did during trying to install Plex and we have to figure out what went wrong.
> 
> Additionally, the guide you used is wrong in some aspects  
> (1) Editing `/etc/default/plexmediaserver.prev` just does nothing. I have no idea why the authors would think this is the correct file 😃  
> (2) Do not try to run Plex as user `pi` but just leave it as `plex`

‘uname -a’ gives  
‘Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux’  
I switched to my RPi3, but I still got a similar result on the Rpi2, and I looked on the board of what I thought was the RPi 2, and it did say it was the Pi 2 model B  
And the other command says  
'● plexmediaserver.service - Plex Media Server for Linux  
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)  
Active: failed (Result: exit-code) since Sat 2018-02-10 20:14:45 MST; 10s ago  
Process: 9490 ExecStart=/bin/sh -c LD\_LIBRARY\_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Serv  
Process: 9487 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}” || /bin/mkdir -  
Main PID: 9490 (code=exited, status=127)

Feb 10 20:14:40 raspberrypi systemd[1]: Started Plex Media Server for Linux.  
Feb 10 20:14:40 raspberrypi systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a  
Feb 10 20:14:40 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.  
Feb 10 20:14:40 raspberrypi systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.  
Feb 10 20:14:45 raspberrypi systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.  
Feb 10 20:14:45 raspberrypi systemd[1]: Stopped Plex Media Server for Linux.  
Feb 10 20:14:45 raspberrypi systemd[1]: plexmediaserver.service: Start request repeated too quickly.  
Feb 10 20:14:45 raspberrypi systemd[1]: Failed to start Plex Media Server for Linux.  
Feb 10 20:14:45 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.  
Feb 10 20:14:45 raspberrypi systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.  
’

---

<div class="post-metadata">

### Author: ![drmagoo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drmagoo/32/13982_2.png) [@drmagoo](https://forums.plex.tv/u/drmagoo)
#### Post date: [February 11, 2018, 12:04pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/6 "2018-02-11T12:04:23Z")

</div>

> @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> ‘uname -a’ gives  
> ‘Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux’  
> I switched to my RPi3, but I still got a similar result on the Rpi2, and I looked on the board of what I thought was the RPi 2, and it did say it was the Pi 2 model B

OK. So it’s not the hardware 🙂 So lets see what we can do

> And the other command says  
> '● plexmediaserver.service - Plex Media Server for Linux  
> Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)  
> Active: failed (Result: exit-code) since Sat 2018-02-10 20:14:45 MST; 10s ago  
> Process: 9490 ExecStart=/bin/sh -c LD\_LIBRARY\_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Serv  
> Process: 9487 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}” || /bin/mkdir -  
> Main PID: 9490 (code=exited, status=127)

Did you do anything else, that’s not in the tutorial? Did you change the owner of `/var/lib/plexmediaserver`? Did you mount `/var/lib/plexmediaserver` on a network storage? Did you setup some process monitoring for Plex or auto reboot cron jobs or other crazy stuff, that I now some other tutorials advise? Please post the directory listing `ls -al /var/lib/plexmediaserver/` and the contents of `/lib/systemd/system/plexmediaserver.service` and tell me anything that comes to your mind, that might be special about your installation.

Btw: you are using Raspbian as Operating System, right?

---

<div class="post-metadata">

### Author: ![cooltop101](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@cooltop101](https://forums.plex.tv/u/cooltop101)
#### Post date: [February 11, 2018, 5:09pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/7 "2018-02-11T17:09:44Z")

</div>

> @uglymagoo said:
> 
> > @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> > ‘uname -a’ gives  
> > ‘Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux’  
> > I switched to my RPi3, but I still got a similar result on the Rpi2, and I looked on the board of what I thought was the RPi 2, and it did say it was the Pi 2 model B
> 
> OK. So it’s not the hardware 🙂 So lets see what we can do
> 
> > And the other command says  
> > '● plexmediaserver.service - Plex Media Server for Linux  
> > Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)  
> > Active: failed (Result: exit-code) since Sat 2018-02-10 20:14:45 MST; 10s ago  
> > Process: 9490 ExecStart=/bin/sh -c LD\_LIBRARY\_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Serv  
> > Process: 9487 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}” || /bin/mkdir -  
> > Main PID: 9490 (code=exited, status=127)
> 
> Did you do anything else, that’s not in the tutorial? Did you change the owner of `/var/lib/plexmediaserver`? Did you mount `/var/lib/plexmediaserver` on a network storage? Did you setup some process monitoring for Plex or auto reboot cron jobs or other crazy stuff, that I now some other tutorials advise? Please post the directory listing `ls -al /var/lib/plexmediaserver/` and the contents of `/lib/systemd/system/plexmediaserver.service` and tell me anything that comes to your mind, that might be special about your installation.
> 
> Btw: you are using Raspbian as Operating System, right?

> @uglymagoo said:
> 
> > @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> > ‘uname -a’ gives  
> > ‘Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux’  
> > I switched to my RPi3, but I still got a similar result on the Rpi2, and I looked on the board of what I thought was the RPi 2, and it did say it was the Pi 2 model B
> 
> OK. So it’s not the hardware 🙂 So lets see what we can do
> 
> > And the other command says  
> > '● plexmediaserver.service - Plex Media Server for Linux  
> > Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)  
> > Active: failed (Result: exit-code) since Sat 2018-02-10 20:14:45 MST; 10s ago  
> > Process: 9490 ExecStart=/bin/sh -c LD\_LIBRARY\_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Serv  
> > Process: 9487 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}” || /bin/mkdir -  
> > Main PID: 9490 (code=exited, status=127)
> 
> Did you do anything else, that’s not in the tutorial? Did you change the owner of `/var/lib/plexmediaserver`? Did you mount `/var/lib/plexmediaserver` on a network storage? Did you setup some process monitoring for Plex or auto reboot cron jobs or other crazy stuff, that I now some other tutorials advise? Please post the directory listing `ls -al /var/lib/plexmediaserver/` and the contents of `/lib/systemd/system/plexmediaserver.service` and tell me anything that comes to your mind, that might be special about your installation.
> 
> Btw: you are using Raspbian as Operating System, right?

`pi@raspberrypi:~ $ ls -al /var/lib/plexmediaserver total 12 drwxr-xr-x 3 plex plex 4096 Feb 7 23:44 . drwxr-xr-x 45 root root 4096 Feb 10 19:44 .. drwxr-xr-x 3 plex plex 4096 Feb 7 23:44 Library `

`[Unit]  
Description=Plex Media Server for Linux  
After=network.target

[Service]  
Environment=“PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR=/var/lib/plexmediaserver/Library/Application Support”  
Environment=PLEX\_MEDIA\_SERVER\_HOME=/usr/lib/plexmediaserver  
Environment=PLEX\_MEDIA\_SERVER\_MAX\_PLUGIN\_PROCS=6  
Environment=PLEX\_MEDIA\_SERVER\_TMPDIR=/tmp  
ExecStartPre=/bin/sh -c ‘/usr/bin/test -d “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}” || /bin/mkdir -p “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}”’  
ExecStart=/bin/sh -c ‘LD\_LIBRARY\_PATH=/usr/lib/plexmediaserver “/usr/lib/plexmediaserver/Plex Media Server”’  
Type=simple  
User=plex  
Group=plex  
Restart=on-failure  
RestartSec=5  
StartLimitInterval=60s  
StartLimitBurst=3

[Install]  
WantedBy=multi-user.target`  
and yes I am using Rasbian , figured that would be the easiest,it was also brand new when I started trying to install Plex

---

<div class="post-metadata">

### Author: ![drmagoo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drmagoo/32/13982_2.png) [@drmagoo](https://forums.plex.tv/u/drmagoo)
#### Post date: [February 11, 2018, 6:19pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/8 "2018-02-11T18:19:26Z")

</div>

> @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> [Install]  
> WantedBy=multi-user.target`  
> and yes I am using Rasbian , figured that would be the easiest,it was also brand new when I started trying to install Plex

Everything looks good so far and the Library was created, so I hope Plex did also create a useful log file in ` /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log`. Please post the contents of this file.

Please also try to restart plex with `sudo systemctl restart plexmediaserver` and then post the new contents of the above mentioned log file.

---

<div class="post-metadata">

### Author: ![cooltop101](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@cooltop101](https://forums.plex.tv/u/cooltop101)
#### Post date: [February 11, 2018, 8:25pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/9 "2018-02-11T20:25:31Z")

</div>

> @uglymagoo said:
> 
> > @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> > [Install]  
> > WantedBy=multi-user.target`  
> > and yes I am using Rasbian , figured that would be the easiest,it was also brand new when I started trying to install Plex
> 
> Everything looks good so far and the Library was created, so I hope Plex did also create a useful log file in ` /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log`. Please post the contents of this file.
> 
> Please also try to restart plex with `sudo systemctl restart plexmediaserver` and then post the new contents of the above mentioned log file.

There’s nothing in `/var/lib/plexmediaserver/Library/Application Support/ ` even when I use that command

---

<div class="post-metadata">

### Author: ![drmagoo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drmagoo/32/13982_2.png) [@drmagoo](https://forums.plex.tv/u/drmagoo)
#### Post date: [February 11, 2018, 9:33pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/10 "2018-02-11T21:33:16Z")

</div>

> @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> There’s nothing in `/var/lib/plexmediaserver/Library/Application Support/ ` even when I use that command

Please issue `sudo systemctl restart plexmediaserver` again, take a look at the output of `journalctl -u plexmediaserver` again and also at `sudo dmesg`. Please also check the free memory with `df -h` and post the output. I have the suspicion, that there is something wrong with your sd card. Did you use the same sd card on your RPi 2 and 3?

---

<div class="post-metadata">

### Author: ![cooltop101](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@cooltop101](https://forums.plex.tv/u/cooltop101)
#### Post date: [February 11, 2018, 10:11pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/11 "2018-02-11T22:11:26Z")

</div>

My post was over 4,000 characters too long, so here’s a link [pastebin.com/W2hqKbUW](https://pastebin.com/W2hqKbUW "https://pastebin.com/W2hqKbUW")

---

<div class="post-metadata">

### Author: ![drmagoo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drmagoo/32/13982_2.png) [@drmagoo](https://forums.plex.tv/u/drmagoo)
#### Post date: [February 11, 2018, 10:56pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/12 "2018-02-11T22:56:38Z")

</div>

> @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> My post was over 4,000 characters too long, so here’s a link [pastebin.com/W2hqKbUW](https://pastebin.com/W2hqKbUW "https://pastebin.com/W2hqKbUW")

There it is:

> /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: \>!not found

The package installation was for whatever reason unsuccessful and the binaries are completely missing 😃 Did you disrupt the package installation? I am quite sure there was an error message or warning. To fix this please try to reinstall my package and post the complete output:

`sudo apt-get install --reinstall plexmediaserver-installer`

---

<div class="post-metadata">

### Author: ![cooltop101](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@cooltop101](https://forums.plex.tv/u/cooltop101)
#### Post date: [February 11, 2018, 11:47pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/13 "2018-02-11T23:47:37Z")

</div>

> @uglymagoo said:
> 
> > @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:  
> > My post was over 4,000 characters too long, so here’s a link [pastebin.com/W2hqKbUW](https://pastebin.com/W2hqKbUW "https://pastebin.com/W2hqKbUW")
> 
> There it is:
> 
> > /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: \>!not found
> 
> The package installation was for whatever reason unsuccessful and the binaries are completely missing 😃 Did you disrupt the package installation? I am quite sure there was an error message or warning. To fix this please try to reinstall my package and post the complete output:
> 
> `sudo apt-get install --reinstall plexmediaserver-installer`

I ran that and got

`Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 51 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for plexmediaserver-installer:armhf `

so I tried installing plexmediaserver-installer and

`pi@raspberrypi:~ $ sudo apt-get install plexmediaserver-installer Reading package lists... Done Building dependency tree Reading state information... Done plexmediaserver-installer is already the newest version (1.10.1.4602-f54242b6b-1). plexmediaserver-installer set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 51 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up plexmediaserver-installer (1.10.1.4602-f54242b6b-1) ... Downloading readynas package ... ######################################################################## 100.0% Passed checksum test. Extracting readynas.deb ... Synchronizing state of plexmediaserver.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable plexmediaserver Job for plexmediaserver.service failed because the control process exited with error code. See "systemctl status plexmediaserver.service" and "journalctl -xe" for details. Setting up plexmediaserver (0.9.16.4.1911-ee6e505-2~jessie) ... W: APT had planned for dpkg to do more than it reported back (3 vs 7). Affected packages: plexmediaserver-installer:armhf `

when I now try to start it it says

`pi@raspberrypi:~ $ sudo systemctl restart plexmediaserver Job for plexmediaserver.service failed because the control process exited with error code. See "systemctl status plexmediaserver.service" and "journalctl -xe" for details. `  
`pi@raspberrypi:~ $ systemctl status plexmediaserver.service  
● plexmediaserver.service - Plex Media Server for Linux  
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)  
Drop-In: /etc/systemd/system/plexmediaserver.service.d  
└─override.conf  
Active: failed (Result: exit-code) since Sun 2018-02-11 16:41:10 MST; 3min 47s ago  
Process: 1134 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}” || /bin/mkdir -p "${PLEX\_MEDIA\_SERVER  
Main PID: 4677 (code=exited, status=127)

Feb 11 16:41:05 raspberrypi systemd[1]: plexmediaserver.service: Control process exited, code=exited status=217  
Feb 11 16:41:05 raspberrypi systemd[1]: Failed to start Plex Media Server for Linux.  
Feb 11 16:41:05 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.  
Feb 11 16:41:05 raspberrypi systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.  
Feb 11 16:41:10 raspberrypi systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.  
Feb 11 16:41:10 raspberrypi systemd[1]: Stopped Plex Media Server for Linux.  
Feb 11 16:41:10 raspberrypi systemd[1]: plexmediaserver.service: Start request repeated too quickly.  
Feb 11 16:41:10 raspberrypi systemd[1]: Failed to start Plex Media Server for Linux.  
Feb 11 16:41:10 raspberrypi systemd[1]: plexmediaserver.service: Unit entered failed state.  
Feb 11 16:41:10 raspberrypi systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.  
`  
and the other command’s results can be found here [pastebin.com/ye9mxFPz](https://pastebin.com/ye9mxFPz "https://pastebin.com/ye9mxFPz")

---

<div class="post-metadata">

### Author: ![drmagoo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drmagoo/32/13982_2.png) [@drmagoo](https://forums.plex.tv/u/drmagoo)
#### Post date: [February 12, 2018, 12:02am UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/14 "2018-02-12T00:02:21Z")

</div>

> @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:

> 2 not fully installed or removed.  
> After this operation, 0 B of additional disk space will be used.  
> Do you want to continue? [Y/n] y  
> Setting up plexmediaserver-installer (1.10.1.4602-f54242b6b-1) …

As I told you, you had disrupted the original installation and the package state was in limbo 😉 And by trying to fix this you made things worse. It’s best just to start from scratch:

```auto
# remove everything plex related
sudo apt-get purge plexmediaserver-installer
sudo rm /etc/systemd/system/plexmediaserver.service.d/override.conf
sudo rm /etc/default/plexmediaserver

# install plex from scratch
sudo apt-get install plexmediaserver-installer

```

Edit: I did not read your first comments correctly and removed my wrong remarks 😊

---

<div class="post-metadata">

### Author: ![cooltop101](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@cooltop101](https://forums.plex.tv/u/cooltop101)
#### Post date: [February 12, 2018, 12:23am UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/15 "2018-02-12T00:23:19Z")

</div>

> @uglymagoo said:
> 
> > @“[cooltop101@gmail.com](mailto:cooltop101@gmail.com)” said:
> 
> > 2 not fully installed or removed.  
> > After this operation, 0 B of additional disk space will be used.  
> > Do you want to continue? [Y/n] y  
> > Setting up plexmediaserver-installer (1.10.1.4602-f54242b6b-1) …
> 
> As I told you, you had disrupted the original installation and the package state was in limbo 😉 And by trying to fix this you made things worse. It’s best just to start from scratch:
> 
> ```auto
> # remove everything plex related
> sudo apt-get purge plexmediaserver-installer
> sudo rm /etc/systemd/system/plexmediaserver.service.d/override.conf
> sudo rm /etc/default/plexmediaserver
> 
> # install plex from scratch
> sudo apt-get install plexmediaserver-installer
> 
> ```
> 
> Edit: I did not read your first comments correctly and removed my wrong remarks 😊

That finally worked, thanks

---

<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: [January 8, 2020, 7:40pm UTC](https://forums.plex.tv/t/exit-code-127-on-raspberry-pi/224769/16 "2020-01-08T19:40:59Z")

</div>


