首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >运行gem install massive_record时make失败

运行gem install massive_record时make失败
EN

Stack Overflow用户
提问于 2018-02-08 19:56:06
回答 1查看 124关注 0票数 0

我想把Rails和HBase连接起来,我想安装MassiveRecord,但是我不能安装gem。我已经运行了: gem install massive_record。当我运行上面的命令时,我拥有sudo特权。

我按照这里给出的说明操作:https://github.com/CompanyBook/massive_record/

我是ruby的新手,不知道该如何处理这个错误。我做错了什么吗?错误:

代码语言:javascript
运行
复制
    ERROR:  Error installing massive_record:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/thrift-0.6.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180208-14824-jzhruq.rb extconf.rb
checking for strlcpy() in string.h... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/thrift-0.6.0/mkmf.log

current directory: /Library/Ruby/Gems/2.3.0/gems/thrift-0.6.0/ext
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.3.0/gems/thrift-0.6.0/ext
make "DESTDIR="
compiling binary_protocol_accelerated.c
compiling compact_protocol.c
compiling memory_buffer.c
compiling protocol.c
compiling thrift_native.c
compiling struct.c
struct.c:48:15: error: expected parameter declarator
extern size_t strlcpy(char *, const char *, size_t);
              ^
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                             ^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
#    define _USE_FORTIFY_LEVEL 2
                               ^
struct.c:48:15: error: expected ')'
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                             ^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
#    define _USE_FORTIFY_LEVEL 2
                               ^
struct.c:48:15: note: to match this '('
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                    ^
struct.c:48:15: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
extern size_t strlcpy(char *, const char *, size_t);
              ^
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

4 errors generated.
make: *** [struct.o] Error 1

make failed, exit code 2
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-02-09 01:32:46

试着运行下面的命令,让我知道它是如何进行的!

代码语言:javascript
运行
复制
gem install massive_record -- --with-cppflags=\"-D_FORTIFY_SOURCE=0 -Wno-shift-negative-value\"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48684917

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档