9
A
回答
5
在我的10.8.3系統,它是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
9
不是一個完整的答案,可以發現真正的版本號,看有發現裏面/usr/include/libxml2/libxml
xmlversion.h
:
Mac-mini-de-Vincent:libxml Vincent$ grep -Ri "LIBXML_DOTTED_VERSION" xmlversion.h
xmlversion.h:#define LIBXML_DOTTED_VERSION "2.9.0"
所以我係統(10.9.1),libxml2版本是2.9.0。
+0
嗨文森特,如果我沒有xmlversion.h文件呢?我試着做「find/usr -name xmlversion.h」,它沒有返回任何東西。謝謝 – rockhammer 2014-04-22 18:52:26
+0
@rockhammer,那麼你需要安裝libxml2-devel軟件包。 – Lucas 2014-07-10 15:59:05
21
另一種選擇是與--version
標誌運行xmllint
和xsltproc
:
$ 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
這意味着我跑的libxml2 2.9.0,1.1.28的libxslt和libexslt 0.8.17。
1
在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
相關問題
- 1. 我如何知道我安裝了哪個版本的monotouch?
- 2. 我如何知道在OSX上安裝了哪些不同版本的Python?
- 3. 在OS X上安裝了多個版本的Rails
- 4. 如何讓軟件包知道我在OS X Lion上安裝了Ruby 1.9.2?
- 5. 如何解碼在Mac OS X上安裝哪個版本的Golang?
- 6. 我如何知道我在git中檢出了哪個版本?
- 7. 從命令行,如何知道在windows/linux中安裝了哪個Firefox版本?
- 8. 如何在OS-X上安裝docker的舊版本(1.8.3)?
- 9. 如何找出在Ubuntu上安裝了哪個版本的GTK +?
- 10. 安裝了哪個版本的oracle
- 11. 如何知道使用命令行安裝了哪個MongoDB版本?
- 12. 如何安裝libxml2版本2.9.0?
- 13. 我如何知道我的手機上有哪些Firefox OS版本?
- 14. 我如何知道我安裝了哪些Eclipse M2E連接器?
- 15. 如何知道是否安裝了Flash的調試版本?
- 16. 我如何知道我安裝的gjslint的版本?
- 17. 如何爲Perl的XML :: LibXSLT安裝libXSLT?
- 18. 在Mac(Yosemite)上安裝了哪個版本的gcc
- 19. 如何知道我是否安裝了IIS Express或完整版?
- 20. 如何知道我在一臺iPhone上安裝了哪些應用程序
- 21. 我如何知道我正在運行哪個WPF版本?
- 22. 如何在OS X上安裝Orbited 10.6
- 23. 如何在mac os上安裝leveldb x
- 24. 如何在OS X上安裝Intel TBB?
- 25. 如何在Mac OS X上安裝mod_jk
- 26. 如何在Mac OS X上安裝LuaSocket
- 27. 如何在Mac OS X上安裝libuuid?
- 28. 如何在Mac OS X上安裝wxPython?
- 29. OS X El Capitan上安裝了Java 1.8?
- 30. Windows Azure服務器上安裝了哪個版本的.net?
夠簡單。謝謝!我正在用更多的手冊頁或-v/- 版本的方式來思考它,但這也是有道理的。 – Spanky 2013-03-21 18:28:03