How to install libxml2-dev libxslt-dev on Mac os

末鹿安然 提交于 2019-12-09 17:54:03

问题


I have installed both libxml2 and libxslt with homebrew, but it doesn't want to install libxml2-dev or libxslt-dev: Error: No available formula for libxml2-dev

I have pip, port, and all I could found. I even installed the Xcode command line tools, but with no luck. What is the way to install libxml2-dev & libxslt-dev on Mac 10.10?


回答1:


Try adding STATIC_DEPS, like this

STATIC_DEPS=true sudo pip install lxml




回答2:


I had the same problem and installing the Command Line Tools fixed the problem for me.

I just wanted to note, that calling xcode-select -p and getting the output /Applications/Xcode.app/Contents/Developer does not tell if Xcode Command Line Tools are installed (like stated in the comments on the question)!

For me it returned the same output but xcode-select --install started the installation. After the installation xcode-select --install printed xcode-select: error: command line tools are already installed, use "Software Update" to install updates

So to check if command line tools are installed better use xcode-select --install.



来源:https://stackoverflow.com/questions/26473197/how-to-install-libxml2-dev-libxslt-dev-on-mac-os

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