我的配置有点搞砸了。我无法安装rbenv:
$ brew install rbenv
Error: You must `brew link pkg-config` before rbenv can be installed
所以我试过了:
$ brew link autoconf pkg-config
Warning: Already linked: /usr/local/Cellar/autoconf/2.69
To relink: brew unlink autoconf && brew link autoconf
Linking /usr/local/Cellar/pkg-config/0.29.1_1...
Error: Could not symlink share/doc/pkg-config
/usr/local/share/doc is not writable.
我正在运行这个版本的brew,但我觉得这个版本列为奇数:
$ brew -v
Homebrew 0.9.9 (git revision aaf8; last commit 2016-09-09)
Homebrew/homebrew-core (git revision 5d48; last commit 2016-09-09)
还试过这个来卸载brew
$ -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)
-e:100:in `realpath': No such file or directory - /usr/local/.git (Errno::ENOENT)
from -e:100:in `realpath'
from -e:100:in `<main>'
Brew医生说我的brew安装相当混乱:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
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/libintl.dylib
/usr/local/lib/libintl.dylib
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/libatk-1.0.0.2209.1.dylib
/usr/local/lib/libgdk-x11-2.0.0.1200.0.dylib
/usr/local/lib/libgdk_pixbuf-2.0.0.1200.0.dylib
/usr/local/lib/libgdk_pixbuf_xlib-2.0.0.1200.0.dylib
/usr/local/lib/libgio-2.0.0.0.0.dylib
/usr/local/lib/libGLEW.1.5.4.dylib
/usr/local/lib/libglib-2.0.0.1600.0.dylib
/usr/local/lib/libgmodule-2.0.0.1600.0.dylib
/usr/local/lib/libgobject-2.0.0.1600.0.dylib
/usr/local/lib/libgthread-2.0.0.1600.0.dylib
/usr/local/lib/libgtk-x11-2.0.0.1200.0.dylib
/usr/local/lib/libintl.8.0.2.dylib
/usr/local/lib/libjpeg.62.dylib
/usr/local/lib/libpango-1.0.0.2100.0.dylib
/usr/local/lib/libpangocairo-1.0.0.2100.0.dylib
/usr/local/lib/libpangoft2-1.0.0.2100.0.dylib
/usr/local/lib/libpangox-1.0.0.2100.0.dylib
/usr/local/lib/libpangoxft-1.0.0.2100.0.dylib
/usr/local/lib/libportaudio.2.0.0.dylib
/usr/local/lib/libSDL-1.2.0.dylib
/usr/local/lib/libz.1.2.5.dylib
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/node/android-ifaddrs.h
/usr/local/include/node/ares.h
/usr/local/include/node/ares_version.h
/usr/local/include/node/libplatform/libplatform.h
/usr/local/include/node/nameser.h
/usr/local/include/node/node.h
/usr/local/include/node/node_buffer.h
/usr/local/include/node/node_internals.h
/usr/local/include/node/node_object_wrap.h
/usr/local/include/node/node_version.h
/usr/local/include/node/openssl/aes.h
/usr/local/include/node/openssl/archs/aix-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/opensslconf.h
/usr/local/include/node/openssl/asn1.h
/usr/local/include/node/openssl/asn1_mac.h
/usr/local/include/node/openssl/asn1t.h
/usr/local/include/node/openssl/bio.h
/usr/local/include/node/openssl/blowfish.h
/usr/local/include/node/openssl/bn.h
/usr/local/include/node/openssl/buffer.h
/usr/local/include/node/openssl/camellia.h
/usr/local/include/node/openssl/cast.h
/usr/local/include/node/openssl/cmac.h
/usr/local/include/node/openssl/cms.h
/usr/local/include/node/openssl/comp.h
/usr/local/include/node/openssl/conf.h
/usr/local/include/node/openssl/conf_api.h
/usr/local/include/node/openssl/crypto.h
/usr/local/include/node/openssl/des.h
/usr/local/include/node/openssl/des_old.h
/usr/local/include/node/openssl/dh.h
/usr/local/include/node/openssl/dsa.h
/usr/local/include/node/openssl/dso.h
/usr/local/include/node/openssl/dtls1.h
/usr/local/include/node/openssl/e_os2.h
/usr/local/include/node/openssl/ebcdic.h
/usr/local/include/node/openssl/ec.h
/usr/local/include/node/openssl/ecdh.h
/usr/local/include/node/openssl/ecdsa.h
/usr/local/include/node/openssl/engine.h
/usr/local/include/node/openssl/err.h
/usr/local/include/node/openssl/evp.h
/usr/local/include/node/openssl/hmac.h
/usr/local/include/node/openssl/idea.h
/usr/local/include/node/openssl/krb5_asn.h
/usr/local/include/node/openssl/kssl.h
/usr/local/include/node/openssl/lhash.h
/usr/local/include/node/openssl/md4.h
/usr/local/include/node/openssl/md5.h
/usr/local/include/node/openssl/mdc2.h
/usr/local/include/node/openssl/modes.h
/usr/local/include/node/openssl/obj_mac.h
/usr/local/include/node/openssl/objects.h
/usr/local/include/node/openssl/ocsp.h
/usr/local/include/node/openssl/opensslconf.h
/usr/local/include/node/openssl/opensslv.h
/usr/local/include/node/openssl/ossl_typ.h
/usr/local/include/node/openssl/pem.h
/usr/local/include/node/openssl/pem2.h
/usr/local/include/node/openssl/pkcs12.h
/usr/local/include/node/openssl/pkcs7.h
/usr/local/include/node/openssl/pqueue.h
/usr/local/include/node/openssl/rand.h
/usr/local/include/node/openssl/rc2.h
/usr/local/include/node/openssl/rc4.h
/usr/local/include/node/openssl/ripemd.h
/usr/local/include/node/openssl/rsa.h
/usr/local/include/node/openssl/safestack.h
/usr/local/include/node/openssl/seed.h
/usr/local/include/node/openssl/sha.h
/usr/local/include/node/openssl/srp.h
/usr/local/include/node/openssl/srtp.h
/usr/local/include/node/openssl/ssl.h
/usr/local/include/node/openssl/ssl2.h
/usr/local/include/node/openssl/ssl23.h
/usr/local/include/node/openssl/ssl3.h
/usr/local/include/node/openssl/stack.h
/usr/local/include/node/openssl/symhacks.h
/usr/local/include/node/openssl/tls1.h
/usr/local/include/node/openssl/ts.h
/usr/local/include/node/openssl/txt_db.h
/usr/local/include/node/openssl/ui.h
/usr/local/include/node/openssl/ui_compat.h
/usr/local/include/node/openssl/whrlpool.h
/usr/local/include/node/openssl/x509.h
/usr/local/include/node/openssl/x509_vfy.h
/usr/local/include/node/openssl/x509v3.h
/usr/local/include/node/pthread-fixes.h
/usr/local/include/node/stdint-msvc2008.h
/usr/local/include/node/tree.h
/usr/local/include/node/uv-aix.h
/usr/local/include/node/uv-bsd.h
/usr/local/include/node/uv-darwin.h
/usr/local/include/node/uv-errno.h
/usr/local/include/node/uv-linux.h
/usr/local/include/node/uv-sunos.h
/usr/local/include/node/uv-threadpool.h
/usr/local/include/node/uv-unix.h
/usr/local/include/node/uv-version.h
/usr/local/include/node/uv-win.h
/usr/local/include/node/uv.h
/usr/local/include/node/v8-debug.h
/usr/local/include/node/v8-platform.h
/usr/local/include/node/v8-profiler.h
/usr/local/include/node/v8-testing.h
/usr/local/include/node/v8-util.h
/usr/local/include/node/v8-version.h
/usr/local/include/node/v8.h
/usr/local/include/node/v8config.h
/usr/local/include/node/zconf.h
/usr/local/include/node/zlib.h
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/libatk-1.0.la
/usr/local/lib/libgdk-x11-2.0.la
/usr/local/lib/libgdk_pixbuf-2.0.la
/usr/local/lib/libgdk_pixbuf_xlib-2.0.la
/usr/local/lib/libgio-2.0.la
/usr/local/lib/libglib-2.0.la
/usr/local/lib/libgmodule-2.0.la
/usr/local/lib/libgobject-2.0.la
/usr/local/lib/libgthread-2.0.la
/usr/local/lib/libgtk-x11-2.0.la
/usr/local/lib/libintl.la
/usr/local/lib/libjpeg.la
/usr/local/lib/libpango-1.0.la
/usr/local/lib/libpangocairo-1.0.la
/usr/local/lib/libpangoft2-1.0.la
/usr/local/lib/libpangox-1.0.la
/usr/local/lib/libpangoxft-1.0.la
/usr/local/lib/libportaudio.la
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/libGLEW.a
/usr/local/lib/libintl.a
/usr/local/lib/libjpeg.a
/usr/local/lib/libportaudio.a
/usr/local/lib/libz.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:
autoconf
libgpg-error
libtool
pkg-config
答案 0 :(得分:0)
FIXED: 删除Unexpected Dylibs下列出的所有文件允许运行brew install rbenv。