gem install libxml-ruby: fatal error: 'plist/Node.h' file not found

限于喜欢 提交于 2019-12-05 12:39:49

From the mkmf.log, I got a hint from:

warning: non-portable path to file '<String.h>'; specified path differs in case from file name on disk

And effectively, the error is from the /usr/local/include/String.h file, which may not be the intended <String.h> file. And this file is mysterious because it wants to include <plist/Node.h>, but /usr/local/include/plist/ doesn't exist.

Actually, I found something else interesting:

brew doctor

Warning: Unbrewed header files were found in /usr/local/include. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected header files:
...
/usr/local/include/String.h
...

So I simply listed those unexpected headers files:

brew doctor 2> doctor.txt  

I manually trimmed the top content of doctor.txt to only keep the list of files. Then I deleted those:

sed 's/^  //g' doctor.txt | tr "\n" "\0" | xargs -0 rm
rm doctor.txt

Then both installation issues were fixed (libxml-ruby and nokogiri).

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