使用gem install jekyll
从gem安装Jekyll时,我收到以下构建错误。我在Windows 7上使用Cygwin,并在安装之前从源代码构建了posix-spawn
gem。
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
我正在使用gem v2.0.7
,ruby v1.9.3p448
,gcc v4.8.1
和g++ v4.8.1
有什么想法吗?我不知道什么时候涉及Ruby宝石。我找不到关于这个“词干”的任何信息。
丹
答案 0 :(得分:6)
原来这个错误的症结在于cannot find -lcrypt
。我安装了libcrypt-devel
,之后编译好的gem。
我认为在大多数原生Linux发行版中,这个库已经包含在内了!
答案 1 :(得分:2)
是的,谢谢,我安装了: - )。
请在cygwin中安装'libcrypt-devel'