新手,github 上 clone 了一个爬虫 direct_web_spider,https://github.com/hooopo/direct_web_spider, 想慢慢研究一下,bundle install 时出现问题。 我的环境是 ubuntu16.10,ruby2.3.3,direct_web_spider 要求 ruby1.9.2+。
current directory:
/home/fan/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/eventmachine-0.12.10/ext
/home/fan/.rbenv/versions/2.3.3/bin/ruby -r ./siteconf20170109-4366-10w5t7g.rb
extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/home/fan/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/eventmachine-0.12.10/mkmf.log
An error occurred while installing eventmachine (0.12.10), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '0.12.10'` succeeds before bundling.
gcc -o conftest -I/home/fan/.rbenv/versions/2.3.3/include/ruby-2.3.0/x86_64-linux -I/home/fan/.rbenv/versions/2.3.3/include/ruby-2.3.0/ruby/backward -I/home/fan/.rbenv/versions/2.3.3/include/ruby-2.3.0 -I. -I/home/fan/.rbenv/versions/2.3.3/include -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -L/home/fan/.rbenv/versions/2.3.3/lib -Wl,-R/home/fan/.rbenv/versions/2.3.3/lib -L. -L/home/fan/.rbenv/versions/2.3.3/lib -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/fan/.rbenv/versions/2.3.3/lib -L/home/fan/.rbenv/versions/2.3.3/lib -lruby-static -lpthread -ldl -lcrypt -lm -lc"
/tmp/ccbt47Zt.o:在函数‘t’中:
/home/fan/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/eventmachine-0.12.10/ext/conftest.c:14:对‘rb_thread_blocking_region’未定义的引用
collect2: error: ld returned 1 exit status
have_header: checking for sys/event.h... -------------------- no
"gcc -E -I/home/fan/.rbenv/versions/2.3.3/include/ruby-2.3.0/x86_64-linux -I/home/fan/.rbenv/versions/2.3.3/include/ruby-2.3.0/ruby/backward -I/home/fan/.rbenv/versions/2.3.3/include/ruby-2.3.0 -I. -I/home/fan/.rbenv/versions/2.3.3/include -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -o conftest.i"
conftest.c:3:23: fatal error: sys/event.h: 没有那个文件或目录