Error installing zsh

I am trying to install zsh but I get some odd results:

osmc@osmc:/media/osmc-sd1/scripts$ sudo apt-get install zsh
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
Suggested packages:
The following NEW packages will be installed:
  zsh zsh-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 4189 kB of archives.
After this operation, 14.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 stretch/main armhf zsh-common all 5.3.1-4 [3454 kB]
Get:2 stretch/main armhf zsh armhf 5.3.1-4+b2 [734 kB]
Fetched 4189 kB in 6s (686 kB/s)
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)

But I am not familiar enough with Debian to understand what the issue is here. Is this something specific to the Vero4k+ configuration? Am I going to break my box if I try to pursue this?


P.S. The reason I am trying to install zsh is to implement some file naming script that I read about on stackexchange.

You can fix the PATH by adding /sbin to it.


My concern with doing this is whether it will break something? Is there a reason this isn’t in the path by default?

It’s how we handle sudo.

ZSH has caused issues in the past I believe

It is in the path by default – at least on my Pi4 and Vero4K, and I’m pretty sure I’ve not modified the path on either.

If /sbin were not in the path, commands like ifconfig would need to be typed as /sbin/ifconfig.


I’ve just installed zsh on my vero4k with no issues, and can confirm that dilthedog is correct that /sbin is indeed in the path.

Please provide the output of:

which ldconfig

which start-stop-daemon

Also please issue:

grab-logs -A

And provide the given link here.

Thanks Tom.

When I run this as the osmc user it does not return any results. When I sudo su - and then run as root it returns:
osmc@osmc:~$ sudo su -
root@osmc:~# which ldconfig
root@osmc:~# which start-stop-daemon

So perhaps the issue is I should be trying to install zsh as root rather than doing sudo apt-get install zsh?

I created the log file as requested here: where last five letters are jojoh.
(My only concern with this is that it makes some of my personal information public – such as the videos the device has recently played was what I noticed at first glance. Is there a way to password protect the file so only the developers have access? And/or does this file auto-delete after a given number of days?)



I’m not sure why /sbin is not the osmc PATH, as on both my vero4ks it is. I suggest following Sam’s suggestion and add /sbin to PATH.

Thanks Tom.

Auto delete, don’t remember exactly how long but i think it was like 2 weeks.


The issue is simply that, even though it should be there, $PATH doesn’t contain /sbin. As @Tom_Doyle has already said, you need to add it to the $PATH variable. The best way to do this on OSMC seems to be to reinstall base-files-osmc:

sudo apt-get install --reinstall base-files-osmc

Log out and then back into user osmc and see if /sbin appears when you run the command echo $PATH.

1 Like

I ran this then reboot. However the echo $PATH still only returns:
osmc@osmc:~$ echo $PATH

I don’t have experience manually editing $PATH and I’m afraid of breaking something so I probably won’t try. I’ll just login as root if/when/as necessary.

Thanks all!

Something is broken in your system. You can ignore it and hope that there are no further errors elsewhere or you can work with us to try to find the cause of the problem. Clearly the choice is yours.

That doesn’t sound very nice. I am clearly trying to work with you. I responded with the output you asked for and upload logs and reinstalled base-files-osmc. The only thing I have not done is messed with the osmc user path – which I’ll do if necessary but at the moment I’m not certain that it is because you’ve asked for nothing beyond this.

I wasn’t trying to sound pushy, but you seemed to have given up trying to fix the issue. I was just trying to point out that this might be a symptom of something else.

Sorry - I just don’t want to break my system. An earlier post suggested zsh might break the system so I don’t want to forge ahead if it requires me to mess with default settings and potentially break it. So I’m just trying to keep changes to a minimum and will abandon if it looks risky.

Btw…if I did want to backup my Kodi settings and then reset the device to factory settings, is there a good set of instructions I can follow for this?

Here’s a good WIki about backing up your .kodi settings:

This post should provide you with more details about ZSH on Debian and OSMC.