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. 如何知道我安装了哪个版本的vs2010?
- 3. 我如何知道安装了哪个版本的mysqli?
- 4. 如何知道安装了哪个版本的MDAC?
- 5. 我怎么能知道安装程序的OS X版本?
- 6. 我如何知道在OSX上安装了哪些不同版本的Python?
- 7. 在OS X上安装了多个版本的Rails
- 8. 如何让软件包知道我在OS X Lion上安装了Ruby 1.9.2?
- 9. 如何解码在Mac OS X上安装哪个版本的Golang?
- 10. 我如何知道我在git中检出了哪个版本?
- 11. bundler如何知道要安装哪个版本的gem?
- 12. 从命令行,如何知道在windows/linux中安装了哪个Firefox版本?
- 13. 如何在OS-X上安装docker的旧版本(1.8.3)?
- 14. 如何在mac os x上安装旧版本的TypeScript?
- 15. 我应该升级安装了OS X Yosemite的版本吗?
- 16. 如何找出在Ubuntu上安装了哪个版本的GTK +?
- 17. 安装了哪个版本的oracle
- 18. 如何知道使用命令行安装了哪个MongoDB版本?
- 19. 如何在os-x上安装版本控制rcs 10.11
- 20. 安装libxml2的多个版本
- 21. 如何安装libxml2版本2.9.0?
- 22. 我如何知道我的手机上有哪些Firefox OS版本?
- 23. 安装了哪个ruby版本?
- 24. 我如何知道我安装了哪些Eclipse M2E连接器?
- 25. 如何知道是否安装了Flash的调试版本?
- 26. 我如何知道我安装的gjslint的版本?
- 27. 如何为Perl的XML :: LibXSLT安装libXSLT?
- 28. 如何知道我使用的是哪个servlet和JSP版本?
- 29. 我怎么知道我已经安装了哪个Facebook iOS SDK
- 30. 在Mac(Yosemite)上安装了哪个版本的gcc
够简单。谢谢!我正在用更多的手册页或-v/- 版本的方式来思考它,但这也是有道理的。 – Spanky 2013-03-21 18:28:03