Gem::Ext::build错误:错误:无法在macOS中构建Gem本机扩展



运行bundle install时出错。这是在macOS 12.6(英特尔芯片(上。

Installing pg_query 2.1.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
...
An error occurred while installing pg_query (2.1.4), and Bundler cannot continue.
In Gemfile:
pg_query

删除xcode工具并重新安装解决了问题。

我也出现了同样的错误,macOS 12.6(英特尔i5(。这帮助了我:

  • 运行sudo rm-rf/Library/Developer/CommandLineTools然后xcode select--install

  • https://github.com/kyleconroy/sqlc/issues/1889

  • https://apple.stackexchange.com/questions/93573/how-to-reinstall-xcode-command-line-tools

最新更新