简体   繁体   English

安装/捆绑gem unf_ext -v'0.0.6'时出错

[英]Error installing/bundling gem unf_ext -v '0.0.6'

I'm trying to bundle intall unf_ext -v '0.0.6' but I keep getting this error: 我正在尝试将unf_ext -v '0.0.6'捆绑unf_ext -v '0.0.6'但我一直收到此错误:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

checking for main() in -lstdc++... yes
checking for ruby/encoding.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling unf.cc
In file included from unf.cc:1:
In file included from ./unf/normalizer.hh:4:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/vector:265:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
         ^
1 error generated.
make: *** [unf.o] Error 1

make failed, exit code 2

I've run gem update --system and i've brew install coreutils but I'm still getting the same error. 我已经运行了gem update --system并且我已经brew install coreutils但是我仍然遇到相同的错误。

Update: Answer 更新:答案
Downloaded and installed commandlinetoolsosx10.10forxcode6.2.dmg from Apple Developer . Apple Developer下载并安装了commandlinetoolsosx10.10forxcode6.2.dmg No need to uninstall anything. 无需卸载任何东西。

Doing this worked for me: 这样做对我有用:

echo '#define _LIBCPP_ASSERT(x, m) ((void)0)' | sudo tee -a /Library/Developer/CommandLineTools/usr/include/c++/v1/__debug > /dev/null

Then run bundle again. 然后再次运行bundle

And, since this is only meant to be a temporary fix until Apple releases a patch, remove that newly created file with: 并且,由于这仅是在Apple发布补丁程序之前的临时修复程序,因此请使用以下方法删除该新创建的文件:

sudo rm /Library/Developer/CommandLineTools/usr/include/c++/v1/__debug

It's a bug in the new xcode tools. 这是新的xcode工具中的错误。 It broke eventmachine in my case. 就我而言,它破坏了事件机器。 See Missing C++ header <__debug> after updating OSX Command Line Tools 6.3 for answers with dummy files and reinstallation links. 更新OSX命令行工具6.3后,请参见缺少C ++标头<__ debug>,以获取有关伪文件和重新安装链接的答案。 I downgraded to 6.2 and the problem went away. 我降级到6.2,问题消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Windows 64位系统中运行捆绑安装时安装unf_ext -v&#39;0.0.6&#39;时出错 - Error installing unf_ext -v '0.0.6' when run bundle install in Windows 64bit 在Mountain Lion Mac上进行gem install unf_ext -v&#39;0.0.6&#39;失败 - gem install unf_ext -v '0.0.6' fails on Mountain Lion mac 安装 unf_ext 0.0.7.2 不起作用 - Installing unf_ext 0.0.7.2 not working 安装unf_ext时,Bundle安装失败。 “安装unf_ext时无法分配内存错误” - Bundle install fails when install unf_ext. “Cannot allocate memory error when installing unf_ext” 宝石unf_ext无法构建宝石本机扩展 - Gem unf_ext failed to build gem native extension 安装 unf_ext (0.0.7.2) 时出错,Bundler 无法继续 - An error occurred while installing unf_ext (0.0.7.2), and Bundler cannot continue 由于编译Unf_ext时出错,无法捆绑安装 - Cannot Bundle Install due to an error compiling Unf_ext ' Vagrant -v忽略ffi -nokogiri和unf_ext,因为它的扩展名没有构建 - Vagrant -v Ignoring ffi -nokogiri and unf_ext because its extensions are not built 在 unf_ext 0.0.8 上使用原生扩展 Chaskiq - Struck on unf_ext 0.0.8 with native extensions Chaskiq 安装机架(2.0.1)时发生错误,并且Bundler无法继续。 捆绑前,请确保`gem install rack -v&#39;2.0.1&#39;`成功 - An error occurred while installing rack (2.0.1), and Bundler cannot continue. Make sure that `gem install rack -v '2.0.1'` succeeds before bundling
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM