在mac osx lion

时间:2015-05-15 06:37:10

标签: ruby macos git homebrew

所以我正在尝试使用自制啤酒升级ruby,但它似乎没有用,因为我得到了这个错误:

brew install ruby​​

Warning: No developer tools installed.
You should install the Command Line Tools.
The standalone package can be obtained from
  https://developer.apple.com/downloads
or it can be installed via Xcode's preferences.
==> Installing dependencies for ruby: pkg-config, readline, libyaml, make
==> Installing ruby dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.28.lion.bottle
Already downloaded: /Library/Caches/Homebrew/pkg-config-0.28.lion.bottle.2.tar.gz
==> Pouring pkg-config-0.28.lion.bottle.2.tar.gz
sh: -L: invalid option
Usage:  sh [GNU long option] [option] ...
    sh [GNU long option] [option] script-file ...
GNU long options:
    --debug
    --debugger
    --dump-po-strings
    --dump-strings
    --help
    --init-file
    --login
    --noediting
    --noprofile
    --norc
    --posix
    --protected
    --rcfile
    --restricted
    --verbose
    --version
    --wordexp
Shell options:
    -irsD or -c command or -O shopt_option      (invocation only)
    -abefhkmnptuvxBCHP or -o option
Error: Failure while executing:  -L /usr/local/Cellar/pkg-config/0.28/bin/pkg-config
Warning: Bottle installation failed: building from source.
Error: pkg-config cannot be built with any available compilers.
To install this formula, you may need to:
  brew install gcc

我现在正在添加x代码,因为它是一台新机器并丢失了它,但还有其他一些我缺少的东西。我跑啤酒医生并得到了这些额外的警告。

sh: line 1:  1977 Segmentation fault: 11  git --version > /dev/null 2>&1
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: Git could not be found in your PATH.
Homebrew uses Git for several internal functions, and some formulae use Git
checkouts instead of stable tarballs. You may want to install Git:
  brew install git

Warning: No developer tools installed.
You should install the Command Line Tools.
The standalone package can be obtained from
  https://developer.apple.com/downloads
or it can be installed via Xcode's preferences.

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/opensslconf.h
    /usr/local/include/node/pthread-fixes.h
    /usr/local/include/node/smalloc.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.h
    /usr/local/include/node/v8config.h
    /usr/local/include/node/v8stdint.h
    /usr/local/include/node/zconf.h
    /usr/local/include/node/zlib.h

我意识到它说git不能在路径中找到,但我不知道如何添加它,所以也许这是我的问题。我安装了git,但它也在表现,有什么想法吗?

1 个答案:

答案 0 :(得分:0)

您应该考虑使用RVM

请参阅:http://railsapps.github.io/installrubyonrails-mac.html