Installing libxml-ruby gem fails because zlib is missing

When I try to install ruby ​​gem libxml-ruby on my Windows computer, I get the following error message

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 

Can someone tell me how to install this stone? I googled for answers and also found the zlib libraries, but don't know where to use them.

I am using ruby ​​version 1.8.7 with devkit 4.5.1

MY DECISION

  • Copy zlib1.dll from ruby ​​/ bin folder to ruby ​​/ lib folder
  • downloaded iconv.dll from ftp://ftp.zlatkovic.com/libxml/ and placed it also in the ruby ​​/ lib folder
  • downloaded libxml2 from ftp://ftp.zlatkovic.com/libxml/ and placed the libxml folder from the include folder in the include devkit directory for mingw (in my case sth. like devkit / mingw / mingw32 / include)
+4
source share
2 answers

I found the development headers for windows98 / NT / 2000 / XP / 2003 on this page linked to zlib.net

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

0
source

Make sure you have zlib headers set. On many Linux distributions, this is a package called "zlib-devel".

Edit: I just realized that you are using a Windows environment. I have no development experience with Windows, but you will need zlib.h somewhere in your inclusion path. I assume that you only have a DLL file that will allow already compiled programs to use zlib, but will not allow you to compile the source code that refers to it.

0
source

Source: https://habr.com/ru/post/1344284/


All Articles