gpt4 book ai didi

c++ - OS X Yosemite 中的 gcc 4.9.1 - gcc : warning: couldn’t understand kern. osversion ‘14.0.0'

转载 作者:IT老高 更新时间:2023-10-28 12:46:33 24 4
gpt4 key购买 nike

我安装了 OS X Yosemite,现在我遇到了 gcc 4.9.1 编译器的大问题。我希望有人可以帮助我。

我尝试编译我的程序并收到警告消息:

gcc: warning: couldn’t understand kern.osversion ‘14.0.0'

我在谷歌上搜索并找到 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407我尝试应用补丁做:

sudo patch -p1 < /usr/local/bin/00-darwin-10.10.patch

在 gcc 文件夹中:/usr/local/bin/gcc我收到了消息:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
|index dd45802..0db14d7 100644
|--- a/fixincludes/fixincl.x
|+++ b/fixincludes/fixincl.x
--------------------------
File to patch:

要修补的文件中: 我已经尝试过 gcc 并且收到了消息:

patching file gcc
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 15.
Hunk #3 succeeded at 1274 with fuzz 2 (offset -7908 lines).
Hunk #4 FAILED at 1319.
Hunk #5 FAILED at 1548.
Hunk #6 FAILED at 2671.
patch: **** Can't rename file gcc to gcc.orig : Permission denied

我尝试使用 sudo 并收到:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
|index dd45802..0db14d7 100644
|--- a/fixincludes/fixincl.x
|+++ b/fixincludes/fixincl.x
--------------------------
File to patch:

我在错误的文件夹中?谁能帮帮我?

最佳答案

我在从源代码构建东西时遇到了类似的问题,这是因为我在升级到 Yosemite 和 xcode 6.1 后忘记安装更新的命令行工具。在你的命令行中试试这个:

xcode-select --install 

这将下载并安装命令行工具,可能会解决您的问题。

关于c++ - OS X Yosemite 中的 gcc 4.9.1 - gcc : warning: couldn’t understand kern. osversion ‘14.0.0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26486163/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com