0

I've looked at what may be a useful answer at Library not loaded error (libidn.11.dylib) when trying to install Homebrew.

However, I don't remember ever having purposely installed MacPorts. Also, do not want to remove anything before I better understand what I would be doing.

Can anyone help me fix this without potentially doing damage.

snapshot from my console

Another snippet from console:

Jonathans-MacBook-Pro-2:bin JonMac$ pwd
/usr/local/bin
Jonathans-MacBook-Pro-2:bin JonMac$ brew install libidn
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 26: /usr/local/Library/brew.rb: Undefined error: 0
Jonathans-MacBook-Pro-2:bin JonMac$ 

Console log trying alvits' suggestions:

Last login: Mon Jul 18 18:10:39 on ttys002
Jonathans-MacBook-Pro-2:~ JonMac$ otool -L /usr/local/bin/curl
/usr/local/bin/curl:
    /usr/local/lib/libcurl.4.dylib (compatibility version 8.0.0, current version 8.0.0)
    /usr/local/lib/libidn.11.dylib (compatibility version 18.0.0, current version 18.11.0)
    /usr/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
    /usr/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
    /usr/local/ssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/ssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.4.0)
    /usr/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
Jonathans-MacBook-Pro-2:~ JonMac$ cd /System/Library/Frameworks/Ruby.framework/Versions
Jonathans-MacBook-Pro-2:Versions JonMac$ ls
2.0 Current
Jonathans-MacBook-Pro-2:Versions JonMac$ 
Community
  • 1
  • 1
Solur
  • 11
  • 6
  • Try `brew install libidn` to install the missing library required by curl – drew010 Jul 17 '16 at 05:07
  • brew itself won't work: 'Jonathans-MacBook-Pro-2:bin JonMac$ pwd /usr/local/bin Jonathans-MacBook-Pro-2:bin JonMac$ brew install libidn /usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory /usr/local/bin/brew: line 26: /usr/local/Library/brew.rb: Undefined error: 0 Jonathans-MacBook-Pro-2:bin JonMac$' – Solur Jul 19 '16 at 00:58
  • You are running `/usr/local/bin/curl` which was probably installed with `ruby` by `homebrew`. Running `otool -L /usr/local/bin/curl` will tell you what required libraries are needed by `/usr/local/bin/curl`. Check if `ruby` can run using `/usr/bin/curl`. – alvits Jul 19 '16 at 01:16
  • The installed `ruby` is missing as well. Did you just recently upgrade `OS X`? If you did, then you need to re-install `homebrew`. You should consider using the `XCode` command line tools when possible. – alvits Jul 19 '16 at 01:21
  • If you have recently upgraded `OS X` you;ll find a newer version of `ruby`. Check the content of this directory `/System/Library/Frameworks/Ruby.framework/Versions`. Update the shebang of `homebrew` to reflect this new current version. – alvits Jul 19 '16 at 02:04
  • Hi Alvits! It seems like i am still on ruby 2.0.0. I am on OS X 11. Should ruby have been upgraded when OS X 11 was installed (some time ago)? I don't know what updating the shebang of 'homebrew' is. I do have the 'XCode' command line tools installed. How should I use these? I haven't used them explicitly before. – Solur Jul 19 '16 at 02:48

1 Answers1

1

The curl installed as part of your PHP installation is missing a library that it expects, for some reason.

You'll probably want to delete these PHP installs from /usr/local, as chances are that they will interfere with future installs of software through Homebrew, but that's up to use.

Try explicitly using the OS X provide curl in /usr/bin/curl.

Based on this response

Nick Iliev
  • 9,610
  • 3
  • 35
  • 89