在Mac上修复/usr/local/include/string.h

时间:2016-03-09 23:54:45

标签: c osx-mavericks

我无法再编译任何C或ruby代码,因为我搞砸了/ usr / local / include。

这是我在做任何涉及C的事情时遇到的错误,包括制作新的rails应用程序。

我确信在玩C时我已经用/ usr / local / include做了一些事情。

我已经多次重新安装了所有内容,包括XCode和命令行工具。

有没有人有任何建议?非常感谢!

*Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies....
Using rake 11.0.1
Using i18n 0.7.0
Installing json 1.8.3 with native extensions

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby.h:33:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ruby.h:51:
/usr/local/include/string.h:44:1: error: unknown type name '__BEGIN_NAMESPACE_STD'
__BEGIN_NAMESPACE_STD
^
/usr/local/include/string.h:46:1: error: expected identifier or '('
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
^
/usr/local/include/string.h:51:6: error: expected function body after function declarator
     __THROW __nonnull ((1, 2));
     ^*

0 个答案:

没有答案