- 清洁山狮安装
- 从应用商店安装 XCode 4.5
- 安装了命令行工具
- 安装家酿
- 酿造医生很高兴
- 安装的 RVM
- rvm 安装 1.9.3
- 安装程序要求更多 brews,安装了以下内容:
- 苹果-gcc42
- 自动配置
- 汽车制造
- 库克巴
- 安装程序要求更多 brews,安装了以下内容:
安装完成,一切正常...
maximus:~$ gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/Users/mmoser/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
creating Makefile
make
compiling generator.c
generator.c:369: warning: unused parameter ‘self’
generator.c:423: warning: unused parameter ‘self’
generator.c:759: warning: unused parameter ‘Vstate’
generator.c:773: warning: unused parameter ‘Vstate’
generator.c:773: warning: unused parameter ‘state’
generator.c:773: warning: unused parameter ‘obj’
generator.c:778: warning: unused parameter ‘Vstate’
generator.c:778: warning: unused parameter ‘state’
generator.c:778: warning: unused parameter ‘obj’
generator.c:783: warning: unused parameter ‘Vstate’
generator.c:783: warning: unused parameter ‘state’
generator.c:783: warning: unused parameter ‘obj’
generator.c:788: warning: unused parameter ‘Vstate’
generator.c:788: warning: unused parameter ‘state’
generator.c:793: warning: unused parameter ‘Vstate’
generator.c:793: warning: unused parameter ‘state’
generator.c:799: warning: unused parameter ‘Vstate’
linking shared-object json/ext/generator.bundle
make install
/Users/mmoser/.rvm/scripts/install -c -m 0755 generator.bundle /Users/mmoser/.rvm/gems/ruby-1.9.3-p362/gems/json-1.7.6/lib/json/ext
/Users/mmoser/.rvm/scripts/install: line 33: /Users/mmoser/.rvm/gems/ruby-1.9.3-p362/gems/json-1.7.6/ext/json/ext/generator/scripts/functions/installer: No such file or directory
/Users/mmoser/.rvm/scripts/install: line 39: install_setup: command not found
Unrecognized option: -c
/Users/mmoser/.rvm/scripts/install: line 84: install_usage: command not found
make: *** [/Users/mmoser/.rvm/gems/ruby-1.9.3-p362/gems/json-1.7.6/lib/json/ext/generator.bundle] Error 1
Gem files will remain installed in /Users/mmoser/.rvm/gems/ruby-1.9.3-p362/gems/json-1.7.6 for inspection.
Results logged to /Users/mmoser/.rvm/gems/ruby-1.9.3-p362/gems/json-1.7.6/ext/json/ext/generator/gem_make.out
我正在拔头发。谁能解释一下?
更多信息:
代码
maximus:~$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
maximus:~$ la /Applications/Xcode.app/Contents/Developer/usr/bin/gcc* && la /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc*
lrwxr-xr-x 1 root wheel 12B Dec 24 19:22 /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -> llvm-gcc-4.2
lrwxr-xr-x 1 root wheel 32B Dec 24 19:22 /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
lrwxr-xr-x 1 root wheel 32B Dec 24 19:22 /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
/usr/bin
maximus:~$ la /usr/bin/gcc* && la /usr/bin/llvm-gcc*
lrwxr-xr-x 1 root wheel 12B Jan 11 19:23 /usr/bin/gcc -> llvm-gcc-4.2
lrwxr-xr-x 1 root wheel 12B Jan 11 19:23 /usr/bin/gcc-4.2 -> llvm-gcc-4.2
lrwxr-xr-x 1 root wheel 32B Dec 25 08:24 /usr/bin/llvm-gcc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
lrwxr-xr-x 1 root wheel 32B Jan 11 19:19 /usr/bin/llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
/usr/local/bin
maximus:~$ la /usr/local/bin/gcc* && la /usr/local/bin/llvm-gcc*
lrwxr-xr-x 1 mmoser admin 46B Jan 11 21:14 /usr/local/bin/gcc-4.2 -> ../Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2
ls: /usr/local/bin/llvm-gcc*: No such file or directory
版本
maximus:~$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
maximus:~$ gcc-4.2 --version
i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bash_profile 包含(这就是引入 $HOME/.rvm/* 路径的原因?)
# Load RVM
if [ -f $HOME/.rvm/scripts/rvm ]; then
source $HOME/.rvm/scripts/rvm
fi
当前回声 $PATH
/Users/mmoser/.rvm/gems/ruby-1.9.3-p362/bin
/Users/mmoser/.rvm/gems/ruby-1.9.3-p362@global/bin
/Users/mmoser/.rvm/rubies/ruby-1.9.3-p362/bin
/Users/mmoser/.rvm/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/Users/mmoser
/Users/mmoser/scripts