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
- installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void <vst4rbot@gmail.com> Co-authored-by: Kaleb Elwert <belak@coded.io> — committed to aunsira/oh-my-zsh by mcornella 6 years ago
- installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void <vst4rbot@gmail.com> Co-authored-by: Kaleb Elwert <belak@coded.io> — committed to gsemet/oh-my-zsh by mcornella 6 years ago
- installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void <vst4rbot@gmail.com> Co-authored-by: Kaleb Elwert <belak@coded.io> — committed to seth-cohen/oh-my-zsh by mcornella 6 years ago
- installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void <vst4rbot@gmail.com> Co-authored-by: Kaleb Elwert <belak@coded.io> — committed to jmartindf/oh-my-zsh by mcornella 6 years ago
- installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void <vst4rbot@gmail.com> Co-authored-by: Kaleb Elwert <belak@coded.io> — committed to sagischwarz/ohmyzsh by mcornella 6 years ago
- installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void <vst4rbot@gmail.com> Co-authored-by: Kaleb Elwert <belak@coded.io> — committed to chihchun/oh-my-zsh by mcornella 6 years ago
- installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void <vst4rbot@gmail.com> Co-authored-by: Kaleb Elwert <belak@coded.io> — committed to kankongmeng/oh-my-zsh by mcornella 6 years ago
- installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void <vst4rbot@gmail.com> Co-authored-by: Kaleb Elwert <belak@coded.io> — committed to spiliopoulos/zsh-config by mcornella 6 years ago
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/shellscheck, distros with stateless defaults will not have a/etc/shellsfile.(I’m using Solus which doesn’t have one, and Clear Linux doesn’t either)
The Solus developer Ikey proposed
which zshorgrep -E ^"${USER}:" /etc/passwd|cut -d : -f 7as a replacement, but I guess just checking the output ofzshworks 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
zshcommand.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
then the install script worked 😃
The condition was wrong, it failed when zsh was installed. Fixed