几近绝望的错误

东方盛慧科技小于 1 分钟心法秘籍经验

几近绝望的错误

go 调试时出现这个问题,看着很无解 ,然后github上下载的go项目也会有此问题,让人很崩溃,go 不能断点调试直接影响开发效率

错误如下:

# runtime/cgo
cgo-gcc-prolog:31:10: error: non-portable path to file '<String.h>'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
In file included from cgo-gcc-prolog:31:
In file included from /usr/local/include/string.h:25:
/usr/local/include/plist/Node.h:26:10: fatal error: 'cstddef' file not found

参考链接

https://stackoverflow.com/questions/49314732/gem-install-libxml-ruby-fatal-error-plist-node-h-file-not-found?utm_source=ld246.comopen in new window

解决步骤:

  1. brew doctor
  2. brew doctor 2> doctor.txt
  3. sed 's/^ //g' doctor.txt | tr "\n" "\0" | xargs -0 rm
  4. rm doctor.txt

非常神奇的好了,感觉上面的3脚本命令好骚

上次编辑于:
贡献者: 雷勋