gpt4 book ai didi

ruby - 安装 libxml-ruby gem 失败,因为缺少 zlib

转载 作者:数据小太阳 更新时间:2023-10-29 07:40:01 25 4
gpt4 key购买 nike

当尝试在我的 Windows 计算机上安装 ruby​​ gem libxml-ruby 时,我收到以下错误消息

D:/.../bin/ruby.exe extconf.rb
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... yes
checking for inflate() in -lz... no
checking for inflate() in -lzlib... no
checking for inflate() in -lzlib1... no
extconf failure: need zlib

谁能告诉我如何安装这个 gem?我在谷歌上搜索了答案,还找到了 zlib 库,但不知道在哪里使用它们。

我正在使用 ruby​​ 版本 1.8.7 和 devkit 4.5.1

我的解决方案

  1. 将 zlib1.dll 从 ruby​​/bin 文件夹复制到 ruby​​/lib 文件夹
  2. ftp://ftp.zlatkovic.com/libxml/ 下载了 iconv.dll并将它也放在 ruby​​/lib 文件夹中
  3. ftp://ftp.zlatkovic.com/libxml/ 下载了 libxml2并将 libxml 文件夹从 include 文件夹中放入 mingw 的 devkit include 目录(在我的例子中……像 devkit/mingw/mingw32/include)

最佳答案

我找到了 development headers for windows98/NT/2000/XP/2003this page链接自 zlib.net

You need that if you want to use zlib in your programs. Officially, zlib does not have a "programmers manual", but a quick read to zlib.h will make your ideas clearer.

关于ruby - 安装 libxml-ruby gem 失败,因为缺少 zlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5353544/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com