gpt4 book ai didi

c++ - 使用rvm安装ruby时出错

转载 作者:行者123 更新时间:2023-11-30 17:19:01 25 4
gpt4 key购买 nike

我正在尝试在 MacOS 中安装 ruby​​

In file included from :0:0:

.ext/include/x86_64-darwin14.0.0/ruby/config.h:77:16: error: duplicate

'unsigned' #define size_t unsigned int

            ^ .ext/include/x86_64-darwin14.0.0/ruby/config.h:77:25: error: two or

more data types in declaration specifiers #define size_t unsigned int

                     ^ In file included from <command-line>:0:0: ./include/ruby/missing.h:169:19: warning: conflicting types for

built-in function 'memmove' [enabled by default] RUBY_EXTERN void

*memmove(void *, const void *, size_t);

               ^ In file included from ./include/ruby.h:32:0,

from main.c:13: ./include/ruby/ruby.h:50:22: fatal error: strings.h: No such file or directory # include <strings.h>

^ compilation terminated.

我设置了env CPP=/usr/bin/cpp

感谢您的帮助。

最佳答案

我通过以下链接修复了它:https://gist.github.com/zenkay/3237860

Mountain Lion supports only XCode 4.4 or greater. Basic 4.4 installer doesn't install Unix's standard command line tools by default. You have to install it using separate package (from Apple Developer's) or directly from XCode 4.4 preference panel (Preferences : Downloads : Components : Install).

When installation is complete, tools are finally available but is not enough. Unfortunately llvm_gcc-4.2 compiler ship with XCode is not suitable to compile Ruby (it works but some features are buggy).

You have to install the stand-alone gcc package.

基本上,我必须安装另一个版本的 gcc,而不是使用 Xcode 版本。

关于c++ - 使用rvm安装ruby时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28997175/

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