0

I have tried running this code

gem install syck -v '1.0.1'

it displayed an error as follows

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

Why this is happening..?

The Fabio
  • 5,369
  • 1
  • 25
  • 55
Sherry
  • 1
  • 1

1 Answers1

0

You could try to use ruby 2.1 as 2.2 seems to cause trouble with this specific version of syck.

If you want to keep ruby 2.2 you might have to use a newer version of syck.

See also: How to install syck 1.0.1 on Ubuntu 15.04?

Community
  • 1
  • 1
IngoAlbers
  • 5,722
  • 6
  • 31
  • 45