xcode 编译时出错:ld:不受支持的tapi文件类型'!YAML文件中的tapi-tbd'[已关闭]

vulvrdjw  于 2023-06-24  发布在  其他
关注(0)|答案(1)|浏览(174)

编辑问题以包括desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将帮助其他人回答这个问题。
3天前关闭。
Improve this question
每当我尝试运行C++代码时,我都会遇到这个错误。

Errors while compiling:
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/lib/libSystem.tbd' for architecture x86_64
collect2: error: ld returned 1 exit status

我看过之前的答案,但没有找到解决方案。我目前使用macOS Ventura 13.4,带有命令行工具版本14.2(Build Version 14C18)。
我安装了Python。我跑了

conda deactivate

然后我的终端在执行命令which -a ld时显示

/usr/bin/ld

我重新订购了我的PATH

/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/opt/openssl@3/bin:/Users/utkarshgupta/anaconda3/condabin

通过执行命令

export PATH="{my above mentioned path}"

有什么线索可以解决吗?任何建议都是有价值的。

oug3syen

oug3syen1#

我已经把Anaconda从我的系统中删除了。我把它作为一个临时的解决方案。但是我想知道是否有其他的方法而不完全删除Anaconda。

相关问题