0
votes

i ran this following code

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .................................................

$ brew doctor

Warning: /usr/local/include isn't writable. This can happen if you "sudo make install" software that isn't managed by by Homebrew. If a brew tries to write a file to this directory, the install will fail during the link step.

You should probably chown /usr/local/include

Warning: /usr/local/lib/pkgconfig isn't writable. This can happen if you "sudo make install" software that isn't managed by by Homebrew. If a brew tries to write a file to this directory, the install will fail during the link step.

You should probably chown /usr/local/lib/pkgconfig

Warning: Some directories in /usr/local/share/locale aren't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew. If a brew tries to add locale information to one of these directories, then the install will fail during the link step. You should probably chown them:

/usr/local/share/locale /usr/local/share/locale/af /usr/local/share/locale/af/LC_MESSAGES ..... .......

Warning: gettext files detected at a system prefix These files can cause compilation and link failures, especially if they are compiled with improper architectures. Consider removing these files: /usr/local/lib/libgettextlib.dylib /usr/local/lib/libintl.dylib /usr/local/include/libintl.h

Warning: libiconv files detected at a system prefix other than /usr Homebrew doesn't provide a libiconv formula, and expects to link against the system version in /usr. libiconv in other prefixes can cause compile or link failure, especially if compiled with improper architectures. OS X itself never installs anything to /usr/local so it was either installed by a user or some other third party software.

tl;dr: delete these files: /usr/local/lib/libiconv.dylib /usr/local/include/iconv.h

Warning: You have MacPorts or Fink installed: /opt/local/bin/port

This can cause trouble. You don't have to uninstall them, but you may want to temporarily move them out of the way, e.g.

sudo mv /opt/local ~/macports

Warning: Unbrewed dylibs were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected dylibs: /usr/local/lib/libasprintf.0.dylib /usr/local/lib/libcharset.1.dylib /usr/local/lib/libcunit.1.dylib /usr/local/lib/libgettextlib-0.18.3.dylib /usr/local/lib/libgettextpo.0.dylib /usr/local/lib/libgettextsrc-0.18.3.dylib /usr/local/lib/libiconv.2.dylib /usr/local/lib/libintl.8.dylib /usr/local/lib/libjansson.4.dylib /usr/local/lib/libltdl.7.dylib /usr/local/lib/libsqlite3.0.dylib

Warning: Unbrewed .la files were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected .la files: /usr/local/lib/libasprintf.la /usr/local/lib/libcharset.la /usr/local/lib/libcunit.la /usr/local/lib/libgettextlib.la /usr/local/lib/libgettextpo.la /usr/local/lib/libgettextsrc.la /usr/local/lib/libiconv.la /usr/local/lib/libintl.la /usr/local/lib/libjansson.la /usr/local/lib/libltdl.la /usr/local/lib/libsqlite3.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected .pc files: /usr/local/lib/pkgconfig/cunit.pc /usr/local/lib/pkgconfig/jansson.pc /usr/local/lib/pkgconfig/libiconv.pc /usr/local/lib/pkgconfig/sqlite3.pc

Warning: Unbrewed static libraries were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected static libraries: /usr/local/lib/libasprintf.a /usr/local/lib/libcharset.a /usr/local/lib/libcunit.a /usr/local/lib/libgettextpo.a /usr/local/lib/libintl.a /usr/local/lib/libjansson.a /usr/local/lib/libltdl.a /usr/local/lib/libsqlite3.a

Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run brew link on these:

cunit ......................................................... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

If i give "brew link libiconv" the following error is Warning: libiconv is keg-only and must be linked with --force Note that doing so can interfere with building software.

Can you tell me how to resolve the libiconv missing error. I installed both Manually and via brew. But still get same following error.

still i getting error when i configure the gcc compile codes

...........
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... no
checking for iconv_open in -liconv... no
configure: error: Could not find libiconv. Please install libiconv and libiconv-devel

Please help me to resolve this. i still break this error upto 2 days. I'm waiting your replies

1

1 Answers

3
votes

Wow! Lots of stuff to fix, there!

Where it says "You should probably chown /usr/local/include", it means you should run:

chown -R `whoami` /usr/local/include

(Same applies for all of the other messages like that.)

It looks like you have a lot of junk in /usr/local, though. I'd maybe move it somewhere else (like, /usr/local-broken) and then reinstall homebrew. You might get away with running

make uninstall

from whereever you installed libiconv from.

Once you've got all the brew doctor warnings resolved, I'd say something like

LDFLAGS=-L/usr/local/opt/libiconv/lib CPPFLAGS=-L/usr/local/opt/libiconv/include brew install whatever

might work for you! This way you're compiling with the libiconv files that homebrew built for you.

Good luck!