mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/u

网友投稿 1067 2022-08-23

mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/u

mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/u

我的系统是mac,然后今天在安装eventmachine的时候发现的报了错误,安装命令为:

sudo gem install eventmachine -v '1.2.7'

错误信息为:

Building native extensions. This could take a while...ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/eventmachine-1.2.7/ext/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190123-26894-gknmbc.rb extconf.rbmkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.hextconf failed, exit code 1Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/eventmachine-1.2.7 for inspection.Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/eventmachine-1.2.7/gem_make.out

解决方式:

xcode-select --install

然后成功安装:

EtCampusDoc git:(master) sudo gem install eventmachine -v '1.2.7'Building native extensions. This could take a while...Successfully installed eventmachine-1.2.7Parsing documentation for eventmachine-1.2.7Installing ri documentation for eventmachine-1.2.7Done installing documentation for eventmachine after 6 seconds1 gem installed

参考文献

[1]. Fail to Building native extensions. on Mac OSX 10.13.6. ​​https://github.com/castwide/vscode-solargraph/issues/78​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:优维EasyOps®全平台又一波新功能上线,操作体验更带劲
下一篇:[leetcode] 94. Binary Tree Inorder Traversal
相关文章

 发表评论

暂时没有评论,来抢沙发吧~