无法在安装了xcode和rvm的Mac OSX 10.9.1上安装Jekyll

时间:2014-02-09 20:49:05

标签: ruby macos gem rvm jekyll

在Mac OSX 10.9.1上安装Jekyll没有任何运气

我安装了rvm,还安装了Xcode 5.0.2。

当我跑gem install jekyll时,它会告诉我......

  

许可被拒绝 -   /Users/Vivid/.rvm/gems/ruby-1.9.2-p320/extensions/x86_64-darwin-12

然后我跑了sudo gem install jekyll然后我得到了:

ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.

    /Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
creating Makefile

make  clean

make
gcc-4.2 -I. -I/Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/x86_64-darwin12.2.0 -I/Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/ruby/backward -I/Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -I/Users/Vivid/.rvm/usr/include -fno-common -pipe  -o porter.o -c porter.c
make: gcc-4.2: No such file or directory
make: *** [porter.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/gems/1.9.1/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-12/1.9.1/fast-stemmer-1.0.2/gem_make.out

这是/Users/Vivid/.rvm/gems/ruby-1.9.3-p327/gems/fast-stemmer-1.0.2/ext/gem_make.out

的内容
/Users/Vivid/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb
creating Makefile

make
compiling porter.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [porter.o] Error 1

有些东西显然不对。任何建议都是神奇的,干杯。

1 个答案:

答案 0 :(得分:3)

您需要安装gcc-4.2。确保您拥有Homebrew installed并运行

brew install apple-gcc42

确保在运行时看到满意的输出:

which gcc-4.2

然后尝试重新运行:

sudo gem install jekyll

轰!安装。