How do I install the latest build of xmllint on OSX 10.7.5

↘锁芯ラ 提交于 2019-12-07 01:14:03

问题


The problem is that I am trying to validate an xml file using xmllint. On my machine (OSX 10f.7.5) it says the xml is invalid. When a co-worker tries it on his machine, it says it is valid. I am not sure what version of OSX he is running but I do know that my version of xmllint is

$ xmllint --version
xmllint: using libxml version 20703

and his version is

$ xmllint --version
xmllint: using libxml version 20708

So the question is how do I build that version (or the latest version) on my machine?


回答1:


It seems that the xmlstarlet package contains xmllint, so this should do the trick:

brew install xmlstarlet

I'm not sure how you would get a specific version though.




回答2:


You can install fink then you can install a deb package from here: http://pdb.finkproject.org/pdb/package.php/libxml2-bin or compile one of the source packages.

You can learn more about fink such as how to install it Installing fink and Installing Packages

The name of the package should be libxml12-bin for the package install commands.

One thing to keep in mind is "The project offers precompiled binary packages as well as a fully automated build-from-source system. " so you can get the latest versions of utilities that are unix/linux/bsd in nature, and if there is no binary build, a few commands can let you build it from source.



来源:https://stackoverflow.com/questions/20391717/how-do-i-install-the-latest-build-of-xmllint-on-osx-10-7-5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!