国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Ruby > 正文

mac os gem安裝json出現(xiàn)error failed的解決辦法

2020-10-29 19:45:06
字體:
來源:轉載
供稿:網(wǎng)友

升級到最新的mac os Mavericks。裝json出現(xiàn)錯誤:

復制代碼 代碼如下:

gem install json -v '1.8.1'


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

    /usr/local/var/rbenv/versions/2.0.0-p247/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
compiling generator.c
In file included from /usr/local/var/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby.h:33,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
/usr/local/var/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/ruby.h:51:21: error: string.h: No such file or directory
/usr/local/var/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/ruby.h:61:21: error: stdint.h: No such file or directory
/usr/local/var/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/ruby.h:64:23: error: inttypes.h: No such file or directory
/usr/local/var/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/ruby.h:68:19: error: stdio.h: No such file or directory


解決辦法:
復制代碼 代碼如下:
xcode-select --install

需要重新安裝Command Line Developer Tools

如果這個辦法還是不行,mac下需要安裝下apple-gcc42

復制代碼 代碼如下:
brew install apple-gcc42

注意brew 0.9.4應該是不帶apple-gcc42的源的,可以使用brew doctor檢查下是否和Mavericks兼容,這里需要升級
復制代碼 代碼如下:
brew update

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 榆社县| 宁晋县| 黄浦区| 耒阳市| 平遥县| 桃园县| 简阳市| 长宁县| 河西区| 永善县| 健康| 宝清县| 堆龙德庆县| 略阳县| 军事| 泰来县| 凉城县| 唐海县| 拉萨市| 遵义市| 五莲县| 蛟河市| 长子县| 封开县| 克东县| 句容市| 滨海县| 寿光市| 勐海县| 岚皋县| 资中县| 青海省| 尼勒克县| 大庆市| 灵山县| 九江县| 叙永县| 定襄县| 威海市| 齐河县| 常熟市|