ohmyzsh: Installer assumes zsh is not installed if it's not in /etc/shells

Hi,

I have zsh installed and used it already some time, but without oh-my-zsh. I would like to give it a try but ran into the error that the install.sh didn’t recognize my already installed zsh?

[userX@hostX1]~% zsh --version
zsh 5.1.1 (x86_64-redhat-linux-gnu
[userX@hostX1]~% rpm -qa | grep zsh
zsh-5.1.1-4.fc23.x86_64
[userX@hostX1]~% echo $SHELL
/bin/zsh
[userX@hostX1]~% cat /etc/redhat-release
Fedora release 23 (Twenty Three)
[userX@hostX1]~% sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
**Zsh is not installed! Please install zsh first!**
[userX@hostX1]~% 

Could you give me a hint what’s wrong? It’s nothing special on my zsh or on my Fedora 23 setup.

Thanks,

regards, ulf

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 24 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Yeah I don’t think they’re ever going to get merged. You can in fact however use the raw version of my changes instead (or download the script yourself and modify it) at https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/283252158563af52f87fd52b15aaaffe029191e5/tools/install.sh

Just to add another reason to not use this /etc/shells check, distros with stateless defaults will not have a /etc/shells file.

(I’m using Solus which doesn’t have one, and Clear Linux doesn’t either)

The Solus developer Ikey proposed which zsh or grep -E ^"${USER}:" /etc/passwd|cut -d : -f 7 as a replacement, but I guess just checking the output of zsh works as well.

@mcornella May I ask how is the progress on this? I’m having this issue on a machine where I have no root access (had to build zsh from source), hence modifying /etc/shells is out of the question. Would be great if it only detects via the zsh command.

Thanks @v0idst4r, in the end I modified install.sh to remove the check and the chsh attempt.

Same here, had to edit the install script to get it working. I am one of the Linuxbrew core maintainers, and am interested to get this fixed, as the zsh we install will not allow to install oh-my-zsh.

If there is anything I can do to move this forward, please tell me. But it looks like there are already two pull requests open to fix this; so not sure I will be of any help, 90% of the work is already done 😃

So once I did

sudo apt install zsh

then the install script worked 😃

The condition was wrong, it failed when zsh was installed. Fixed