gpt4 book ai didi

ruby-on-rails - gem install syck -v '1.0.1' 不起作用

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

我尝试运行此代码

gem install syck -v '1.0.1'

显示错误如下

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

/home/sherin/.rbenv/versions/2.2.1/bin/ruby -r ./siteconf20150923-19918-9w2wjv.rb extconf.rb checking for st.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR=" compiling token.c token.re: In function
‘sycklex_yaml_utf8’: token.re:541:36: warning: variable ‘lvl’ set but
not used [-Wunused-but-set-variable] compiling implicit.c compiling
syck.c compiling gram.c compiling bytecode.c compiling node.c
compiling rubyext.c rubyext.c:31:20: error: field ‘hash’ has
incomplete type
struct RHash hash;
^ rubyext.c: In function ‘syck_seq_initialize’: rubyext.c:1529:15: warning: variable ‘node’ set but not used
[-Wunused-but-set-variable]
SyckNode *node;
^ make: *** [rubyext.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/home/sherin/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/syck-1.0.1
for inspection. Results logged to
/home/sherin/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/syck-1.0.1/gem_make.out

为什么会发生这种情况......?

最佳答案

您可以尝试使用 ruby​​ 2.1,因为 2.2 似乎会对这个特定版本的 syck 造成问题。

如果您想保留 ruby​​ 2.2,您可能必须使用更新版本的 syck。

另请参阅: How to install syck 1.0.1 on Ubuntu 15.04?

关于ruby-on-rails - gem install syck -v '1.0.1' 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32735924/

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