Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tell what version of libxml2 and libxslt are installed on OS X?

I'm trying to find out what version I currently have installed. OS X Mountain Lion (10.8.2)

Thanks in advance!

like image 487
Spanky Avatar asked Mar 21 '13 17:03

Spanky


People also ask

Where is libxml2 installed?

As indicated by the Downloads page from the reference site of libxml2, Windows binaries are to be found on: http://xmlsoft.org/sources/win32/ for 32 bit architectures. http://xmlsoft.org/sources/win32/64bit/ for 64 bit.


2 Answers

Another option is to run xmllint and xsltproc with the --version flag:

$ xmllint --version
xmllint: using libxml version 20900
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib
$ xsltproc --version
Using libxml 20900, libxslt 10128 and libexslt 817
xsltproc was compiled against libxml 20900, libxslt 10128 and libexslt 817
libxslt 10128 was compiled against libxml 20900
libexslt 817 was compiled against libxml 20900

This means I'm running libxml2 2.9.0, libxslt 1.1.28, and libexslt 0.8.17.

like image 160
nwellnhof Avatar answered Sep 28 '22 00:09

nwellnhof


Not a complete answer, the real version number can be found looking at include xmlversion.h found inside /usr/include/libxml2/libxml:

Mac-mini-de-Vincent:libxml Vincent$ grep -Ri "LIBXML_DOTTED_VERSION" xmlversion.h
xmlversion.h:#define LIBXML_DOTTED_VERSION "2.9.0"

So on my system (10.9.1), the libxml2 version is 2.9.0.

like image 27
Vincent Ricosti Avatar answered Sep 28 '22 01:09

Vincent Ricosti