更新 这是Ruby 1.9.3的新错误日志
checking for pthread-config... no
configure: error: could not find libpthread
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby193/bin/ruby
extconf.rb:35:in `run': 'env CFLAGS='-fPIC -O3 -g -Wextra -Wno-unused-parameter -Wno-
from extconf.rb:53:in `block (2 levels) in check_libmemcached'
from extconf.rb:52:in `chdir'
from extconf.rb:52:in `block in check_libmemcached'
from extconf.rb:49:in `chdir'
from extconf.rb:49:in `check_libmemcached'
from extconf.rb:70:in `<main>'
Touching aclocal.m4 in libmemcached.
touch -r libmemcached-0.32/m4/visibility.m4 libmemcached-0.32/configure.ac libmemcache
Configuring libmemcached.
env CFLAGS='-fPIC -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-lon
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/memcached-1.3.5
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/memcached-1.3.5/ext/gem_make.out
我的安装是来自rubyinstaller.org的Ruby 1.8.7。 (mingw32版) 安装Northscale / membase(membase.org)。安装得很好。
然后尝试了两个
gem install memcached-northscale --no-ri --no-rdoc 和 gem install memcached --no-ri --no-rdoc
他们都希望安装libmemcached并从源代码构建......好的..
C:/Ruby187/bin/ruby.exe extconf.rb
构建libmemcached。
tar xzf libmemcached-0.32.tar.gz 2&gt;&amp; 1
修补libmemcached源。
patch -p1 -Z&lt; libmemcached.patch
修补文件libmemcached-0.32 / libmemcached / memcached_response.c
断言失败:hunk,file ../patch-2.5.9-src/patch.c,line 354
此网址建议修复.. Windows处理CR / CRLF。
http://www.mail-archive.com/gnuwin32-users@lists.sourceforge.net/msg01528.html
但是尽管改变了.patch文件,我仍然会失败:
C:\ Ruby187 \ lib \ ruby \ gems \ 1.8 \ gems \ memcached-northscale-0.19.5.4 \ ext&gt; ruby extconf.rb
构建libmemcached。
tar xzf libmemcached-0.32.tar.gz 2&gt;&amp; 1
修补libmemcached源。
patch -p1 -Z&lt; libmemcached.patch
[...剪断...]
使用SASL支持修补libmemcached
patch -p1 -Z&lt; sasl.patch
[...剪断...]
下一个补丁将创建文件libmemcached-0.32 / config / config.rpath,
哪个已经存在!假设-R? [N]
无论如何申请? [N]
跳过补丁。
忽略1个hunk中的1个 - 将拒绝保存到文件libmemcached-0.32 / config / config.rpath.rej
修补文件libmemcached-0.32 / config.h.in
修补文件libmemcached-0.32 / configure
补丁: * *格式错误的补丁在第26625行:'
* extconf.rb失败*
有什么想法吗?当然有人在那里使用Windows,Ruby和Memcache ???
答案 0 :(得分:1)
对Windows的libmemcached支持还处于起步阶段。通常,人们在Windows上使用ruby本机客户端,就像您找到的那样。
答案 1 :(得分:1)
试试这个:
直接下载链接:
http://code.jellycan.com/files/memcached-1.2.5-win32-bin.zip
安装Memcached-Client
启动memcached服务器。它表示从Microsoft管理控制台启动服务器或运行以下命令:
'c:\ memcached \ memcached.exe -d start'