Skip to content
This repository has been archived by the owner. It is now read-only.

Cannot open zsh shell as login #27106

Closed
wsargent opened this Issue Mar 1, 2014 · 14 comments

Comments

Projects
None yet
9 participants
@wsargent
Copy link
Contributor

wsargent commented Mar 1, 2014

Following my last brew update, zsh stopped working as my default login shell. I'm on MacOS 10.9.2 and /usr/local/bin/zsh is in my /etc/shells.

When I hit Cmd-N in iTerm, the following text shows up:

Last login: Fri Feb 28 20:40:43 on ttys001
dyld: Library not loaded: /usr/local/lib/libgdbm.4.dylib
Referenced from: /usr/local/bin/zsh
Reason: image not found

@mistydemeo

This comment has been minimized.

Copy link
Member

mistydemeo commented Mar 1, 2014

Try brew install gdbm. If it's already installed, but not linked, you can also try brew ln gdbm.

@wsargent

This comment has been minimized.

Copy link
Contributor Author

wsargent commented Mar 1, 2014

Fixed, but the oddest thing -- man3 had the wrong permissions:

➜ ~ brew ln gdbm
Warning: Already linked: /usr/local/Cellar/gdbm/1.11
To relink: brew unlink gdbm && brew link gdbm
➜ ~ brew unlink gdbm && brew link gdbm
Unlinking /usr/local/Cellar/gdbm/1.11... 0 links removed
Linking /usr/local/Cellar/gdbm/1.11... Warning: Could not link gdbm. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/gdbm/1.11/share/man/man3/gdbm.3
/usr/local/share/man/man3 is not writable. You should change its permissions.

@adamv

This comment has been minimized.

Copy link
Contributor

adamv commented Mar 2, 2014

Is this fixed now?

@wsargent

This comment has been minimized.

Copy link
Contributor Author

wsargent commented Mar 2, 2014

It is fixed now.

Will Sargent
Consultant, Professional Services
Typesafe http://typesafe.com, the company behind Play
Frameworkhttp://www.playframework.com,
Akka http://akka.io and Scala http://www.scala-lang.org/

On Sun, Mar 2, 2014 at 9:19 AM, Adam Vandenberg notifications@github.comwrote:

Is this fixed now?

Reply to this email directly or view it on GitHubhttps://github.com//issues/27106#issuecomment-36459738
.

@adamv adamv closed this Mar 3, 2014

@shedd

This comment has been minimized.

Copy link

shedd commented Mar 4, 2014

I also ran into this issue upgrading to OS X Mavericks.

Eventually, I went through the following steps to fix it:

brew update
brew doctor
brew upgrade
brew cleanup

After that, I was still getting these issues when trying to load zsh as my shell:

dyld: Library not loaded: /usr/local/lib/libgdbm.4.dylib

I ended up running this command to reinstall and relink:

brew reinstall gdbm && brew unlink gdbm && brew link gdbm

Then I had to do the same for pcre:

dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib

brew reinstall pcre && brew unlink pcre && brew link pcre

@akshatpradhan

This comment has been minimized.

Copy link

akshatpradhan commented May 30, 2014

+1 for having experienced this problem. I was experiencing the gdbm and pcre thing as well but relinking solved the problem.

@albertsj1

This comment has been minimized.

Copy link

albertsj1 commented Jun 18, 2014

👍 had this problem as well after upgrading to OSX 10.9. The suggestion for pcre and gdbm worked to fix zsh. I actually had the same problem though with every brew installed app. The symlinks were missing, so I ran the following which fixed everything.

for x in $(brew list -1); do brew unlink $x; brew link $x; done
@akshatpradhan

This comment has been minimized.

Copy link

akshatpradhan commented Jun 18, 2014

@albertsj1 Interesting. I also had the same problem with every brew installed app. With my situation, my OS was reinstalled.

@al3x

This comment has been minimized.

Copy link
Contributor

al3x commented Jul 3, 2014

@albertsj1 Had the same issue after a wonky upgrade to 10.9.4 today. Thanks for your handy one-liner!

@lojunren

This comment has been minimized.

Copy link

lojunren commented Oct 28, 2014

@albertsj1 Great Job! Thanks for your solution!

@petems

This comment has been minimized.

Copy link

petems commented Dec 5, 2014

This thread saved me!

Man, was trying to fix someones install of haproxy for ages with a similar issue:

dyld: Library not loaded: @@HOMEBREW_PREFIX@@/lib/libpcre.1.dylib
  Referenced from: /opt/boxen/homebrew/bin/haproxy
  Reason: image not found

In my case it was pcre that was the problem:

brew unlink pcre
brew link pcre
@akshatpradhan

This comment has been minimized.

Copy link

akshatpradhan commented Dec 5, 2014

@petems welcome to the club!

@albertsj1

This comment has been minimized.

Copy link

albertsj1 commented Dec 5, 2014

Yeah. This seems to be a common problem when there are any major changes/upgrades. Glad to hear you got things working.

@petems

This comment has been minimized.

Copy link

petems commented Dec 5, 2014

Yep, just thought I'd add in my exact issue for SEO purposes (or when I forget about this and end up googling the exact same error 😓)

@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.