我在安装ruby18_source_location
时遇到了困难,而且我对红宝石相对较新。那么......有没有人对如何解决这个问题有任何想法?我试图在rails应用程序中执行bundle install
。
首先,我尝试通过以下方式安装软件包:
$ gem install ruby18_source_location
但那失败了。然后我git克隆了这个包:https://github.com/ConradIrwin/ruby18_source_location
当我尝试从源代码构建时,我遇到了与运行gem install
时相同的错误:
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -fPIC -m64 -o ruby18_source_location.o -c ruby18_source_location.c
In file included from ruby18_source_location.c:2:0:
node.h:362:0: warning: "RUBY_EVENT_NONE" redefined
#define RUBY_EVENT_NONE 0x00
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2055:0: note: this is the location of the previous definition
#define RUBY_EVENT_NONE 0x0000
In file included from ruby18_source_location.c:2:0:
node.h:363:0: warning: "RUBY_EVENT_LINE" redefined
#define RUBY_EVENT_LINE 0x01
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2056:0: note: this is the location of the previous definition
#define RUBY_EVENT_LINE 0x0001
In file included from ruby18_source_location.c:2:0:
node.h:364:0: warning: "RUBY_EVENT_CLASS" redefined
#define RUBY_EVENT_CLASS 0x02
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2057:0: note: this is the location of the previous definition
#define RUBY_EVENT_CLASS 0x0002
In file included from ruby18_source_location.c:2:0:
node.h:365:0: warning: "RUBY_EVENT_END" redefined
#define RUBY_EVENT_END 0x04
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2058:0: note: this is the location of the previous definition
#define RUBY_EVENT_END 0x0004
In file included from ruby18_source_location.c:2:0:
node.h:366:0: warning: "RUBY_EVENT_CALL" redefined
#define RUBY_EVENT_CALL 0x08
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2059:0: note: this is the location of the previous definition
#define RUBY_EVENT_CALL 0x0008
In file included from ruby18_source_location.c:2:0:
node.h:367:0: warning: "RUBY_EVENT_RETURN" redefined
#define RUBY_EVENT_RETURN 0x10
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2060:0: note: this is the location of the previous definition
#define RUBY_EVENT_RETURN 0x0010
In file included from ruby18_source_location.c:2:0:
node.h:368:0: warning: "RUBY_EVENT_C_CALL" redefined
#define RUBY_EVENT_C_CALL 0x20
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2061:0: note: this is the location of the previous definition
#define RUBY_EVENT_C_CALL 0x0020
In file included from ruby18_source_location.c:2:0:
node.h:369:0: warning: "RUBY_EVENT_C_RETURN" redefined
#define RUBY_EVENT_C_RETURN 0x40
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2062:0: note: this is the location of the previous definition
#define RUBY_EVENT_C_RETURN 0x0040
In file included from ruby18_source_location.c:2:0:
node.h:370:0: warning: "RUBY_EVENT_RAISE" redefined
#define RUBY_EVENT_RAISE 0x80
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2063:0: note: this is the location of the previous definition
#define RUBY_EVENT_RAISE 0x0080
In file included from ruby18_source_location.c:2:0:
node.h:371:0: warning: "RUBY_EVENT_ALL" redefined
#define RUBY_EVENT_ALL 0xff
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2064:0: note: this is the location of the previous definition
#define RUBY_EVENT_ALL 0x00ff
In file included from ruby18_source_location.c:2:0:
node.h:373:16: error: conflicting types for ‘rb_event_hook_func_t’
typedef void (*rb_event_hook_func_t) _((rb_event_t,NODE*,VALUE,ID,VALUE));
^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2093:16: note: previous declaration of ‘rb_event_hook_func_t’ was here
typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
^~~~~~~~~~~~~~~~~~~~
In file included from ruby18_source_location.c:2:0:
node.h:375:6: error: conflicting types for ‘rb_add_event_hook’
void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t));
^~~~~~~~~~~~~~~~~
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2096:6: note: previous declaration of ‘rb_add_event_hook’ was here
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
^~~~~~~~~~~~~~~~~
In file included from ruby18_source_location.c:2:0:
node.h:376:5: error: conflicting types for ‘rb_remove_event_hook’
int rb_remove_event_hook _((rb_event_hook_func_t));
^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/ruby.h:33:0,
from ruby18_source_location.c:1:
/usr/include/ruby/ruby.h:2097:5: note: previous declaration of ‘rb_remove_event_hook’ was here
int rb_remove_event_hook(rb_event_hook_func_t func);
^~~~~~~~~~~~~~~~~~~~
In file included from node.h:383:0,
from ruby18_source_location.c:2:
/usr/include/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h" [-Wcpp]
#warning use "ruby/st.h" instead of bare "st.h"
^~~~~~~
ruby18_source_location.c: In function ‘method_source_location’:
ruby18_source_location.c:90:19: warning: unused variable ‘block’ [-Wunused-variable]
struct BLOCK *block;
^~~~~
Makefile:239: recipe for target 'ruby18_source_location.o' failed
make: *** [ruby18_source_location.o] Error 1
就像我说的,我是红宝石的新手。我无法在线找到与此特定问题相关的任何解决方案。
我看到了一些关于卸载中间人,然后安装此软件包,然后重新安装中间人的建议。我试过了,那没用。 :(