How do I install libraries?

I'm trying to install the "libxml" Gem ( http://libxml.rubyforge.org/install.xml ) and it says libxml requires several other libraries to be installed in order to build and function properly:

  * libm      (math routines: very standard)
  * libz      (zlib)
  * libiconv
  * libxml2

      

I've installed RubyGems, but I'm wondering, for example, is "libiconv" also a gem?

What is the way to download and install these libraries above?

Thank!

+1


source to share


3 answers


I am assuming you are using some kind of Linux. Just open your package manager and search for libraries. Should be pretty easy



+1


source


You should just send the include dependencies argument to the gem when installing.



gem install libxml --include-dependencies

      

+1


source


These are all C libraries that have nothing to do with Ruby and therefore are not packaged as Gems. You will have to install them through your operating system's package manager or, if your operating system does not have a package manager, manually.

However, if your operating system has a package manager, you might be better off installing libxml-ruby through the OS package manager instead of RubyGems, so all dependencies will be automatically met. On Debian-ish systems the package is named libxml-ruby

or something like that.

+1


source







All Articles