4

When installing Jekyll from gem using gem install jekyll, I am getting the following build error. I am using Cygwin on Windows 7 and have built the posix-spawn gem from source prior to installing.

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

    /usr/bin/ruby.exe extconf.rb
creating Makefile

make
gcc -I. -I/usr/include/ruby-1.9.1/x86_64-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.   -ggdb -O2 -pipe   -fno-strict-aliasing   -o porter.o -c porter.c
gcc -I. -I/usr/include/ruby-1.9.1/x86_64-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.   -ggdb -O2 -pipe   -fno-strict-aliasing   -o porter_wrap.o -c porter_wrap.c
rm -f stemmer.so
gcc -shared -o stemmer.so porter.o porter_wrap.o -L. -L/usr/lib -L.  -Wl,--export-all-symbols -Wl,--enable-auto-image-base,--enable-auto-import    -lruby191  -lpthread -lrt -ldl -lcrypt
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lcrypt
collect2: error: ld returned 1 exit status
Makefile:214: recipe for target `stemmer.so' failed
make: *** [stemmer.so] Error 1


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/fast-stemmer-1.0.2/ext/gem_make.out

I am using gem v2.0.7, ruby v1.9.3p448, gcc v4.8.1 and g++ v4.8.1

Any ideas? I have no idea when it comes to Ruby gems. I cannot find any information on this "stemmer".

Dan

4

2 回答 2

6

原来这个错误的症结在于cannot find -lcrypt. 之后我安装libcrypt-devel并编译了gem。

我认为在大多数原生 Linux 发行版上,这个库已经包含在内了!

于 2013-08-27T14:11:41.280 回答
2

是的,谢谢,我安装了:-)。

请在 cygwin 中安装“libcrypt-devel”

于 2013-09-04T11:49:35.360 回答