gpt4 book ai didi

ruby - 无法安装 ruby​​ gem "yajl-ruby"

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

我正在尝试安装 ruby​​ gem“yajl ruby​​”。我正在运行 Mac OS 10.7.4 和 Ruby 1.8.7(2011-12-28 补丁级别 357)[universal-darwin11.0]。当我运行时:

sudo gem install yajl-ruby

我得到以下输出:

Building native extensions.  This could take a while...
ERROR: Error installing yajl-ruby:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile

make
gcc -I. - I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe - fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -funroll-loops -c yajl.c
make: gcc: No such file or directory
make: *** [yajl.o] Error 1


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/yajl-ruby-1.1.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out

我需要做什么才能使安装工作?

最佳答案

试试这个:

$ sudo ln -s/usr/bin/llvm-gcc/usr/bin/gcc-4.2

关于ruby - 无法安装 ruby​​ gem "yajl-ruby",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13548007/

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