gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 18:18:55 32 4
gpt4 key购买 nike

在 Mac OSX 10.9.1 上安装 Jekyll 时运气不佳

我安装了 rvm 和 Xcode 5.0.2。

当我运行 gem install jekyll 时,它告诉我...

Permission denied - /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

显然有些事情是不对的。任何建议都会很神奇,干杯。

最佳答案

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

brew install apple-gcc42

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

which gcc-4.2

然后尝试重新运行:

sudo gem install jekyll

轰!已安装。

关于ruby - 无法在安装了 xcode 和 rvm 的 Mac OSX 10.9.1 上安装 Jekyll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21664841/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com