Sto cercando di scoprire quale versione è attualmente installata. OS X Mountain Lion (10.8.2)Come posso sapere quale versione di libxml2 e libxslt sono installati su OS X?
Grazie in anticipo!
Sto cercando di scoprire quale versione è attualmente installata. OS X Mountain Lion (10.8.2)Come posso sapere quale versione di libxml2 e libxslt sono installati su OS X?
Grazie in anticipo!
Sul mio sistema 10.8.3 E '2.2:
> ls -l /usr/lib/libxml*
-rwxr-xr-x 1 root wheel 2390032 Mar 2 17:18 /usr/lib/libxml2.2.dylib*
lrwxr-xr-x 1 root wheel 15 Mar 2 17:21 /usr/lib/[email protected] -> libxml2.2.dylib
Non una risposta completa, il vero numero di versione può essere trovata guardando includono xmlversion.h
trovato all'interno /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"
Quindi sul mio system (10.9.1), la versione di libxml2 è 2.9.0.
Ciao Vincent, cosa succede se non ho il file xmlversion.h? Ho provato a fare "find/usr -name xmlversion.h" e non ha restituito nulla. Grazie – rockhammer
@rockhammer, quindi è necessario installare il pacchetto libxml2-devel. – Lucas
Un'altra opzione è quella di eseguire xmllint
e xsltproc
con la bandiera --version
:
$ 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
Ciò significa che sto correndo libxml2 2.9.0, libxslt 1.1.28 e 0.8.17 libexslt.
In 10.8.5:
$ /usr/bin/xmllint --version
/usr/bin/xmllint: using libxml version 20708
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
$ /usr/bin/xsltproc --version
Using libxml 20708, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20708
libexslt 815 was compiled against livxml 20708
abbastanza semplice. Grazie! Ci stavo pensando in più di una pagina man o di versioni -v/-, ma anche questo ha senso. – Spanky