I am trying to install Fish shell using homebrew using command:

brew install fish

But the installation fails with the following error:

==> ./configure --prefix=/usr/local/Cellar/fish/2.1.1 SED=/usr/bin/sed
checking for library containing setupterm... -lncurses
checking for library containing nan... none required
checking for library containing iconv_open... no
checking for library containing libiconv_open... no
configure: error: Could not find an iconv implementation, needed to build fish

I tried searching around but no clear solution was found. System configuration:

$ brew --config
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: f03104755df8cbfb720254bd88ac7594a3837d36
Last commit: 11 hours ago
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit haswell
OS X: 10.10.1-x86_64
Clang: 6.0 build 600
X11: N/A
System Ruby: 2.0.0-481
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby

Could you please help to fix this? Thanks!

  • 1
    Can you add what the output from brew doctor is? This is usually a great first step to fixing build problems.
    – Mikey T.K.
    Nov 19, 2014 at 18:35
  • brew doctor does not tell anything unfortunately. Have a look at full log: gist.github.com/kmisiunas/cd7496a8fdaedba3c9a5
    – Karolis
    Nov 19, 2014 at 20:23
  • Nothing there indeed.. I'm able to get it to build on my system, only difference being that I have XCode installed (brew --config shows Xcode: 6.1 where yours does not), and i've got a newer version of Brew installed (commit ends in 37d36, and I saw that the fish package got an update). Try doing a brew update, and if that fails, installing Xcode from the appstore. Oddly enough, if I try to do a brew install libiconv', I get a message back saying Apple distributes libiconv with OS X. Smells like a pathing problem of some kind.
    – Mikey T.K.
    Nov 20, 2014 at 18:09
  • Just installed XCode 6.1. The same problem. I suspect the problem is deeper. I agree with your pathing hypothesis - just not sure how to fix it.
    – Karolis
    Nov 20, 2014 at 19:55
  • 1
    Just realised. You have an /opt folder. Have you installed MacPorts? Nov 30, 2014 at 0:29

1 Answer 1


In the log that you posted above the following three lines suggest that you have MacPorts installed.

checking for /opt/local/include include directory... yes
checking for /opt/local/lib library directory... yes
checking for /opt/local/bin command directory... yes

It also appears that brew is checking there before checking in its regular file locations (/usr/local, etc). Something under /opt might be confusing brew and preventing it from compiling fish.

This can be mended by following MacPorts uninstall guide: guide.macports.org/#installing.macports.uninstalling

  • It seems to be already installed. Response was: "xcode-select: error: command line tools are already installed"
    – Karolis
    Nov 29, 2014 at 22:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .