尝试 运行 crystal 规格时找不到 -lxml2

Cannot find -lxml2 when trying to run crystal spec

您好,我在尝试 运行 crystal spec

时遇到错误
/usr/bin/ld: cannot find -lxml2

这只是依赖性错误还是?我试过谷歌搜索但仍然找不到解决方案。

您需要安装 libxml 开发 headers。检查这个:https://github.com/crystal-lang/crystal/wiki/All-required-libraries

或者如果从字面上看问题:

apt-get install libxml2-dev