dyld: 符号未找到:_os_release

我很少从源代码构建任何东西,所以我真的不知道在这里发生了什么,但已经搜索了好几个小时,还是解决不了它...

我从应用商店安装了xcode,下载了最新版本的lua,以下是发生的情况:

cd lua-5.3.0

make macosx

dyld: Symbol not found: _os_release
Referenced from:  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /usr/local/terrame/lib/libSystem.B.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
make: error: unable to locate xcodebuild, please make sure the path to     the Xcode folder is set correctly!
make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

然后我运行

xcode-select -r

仍然得到

dyld: Symbol not found: _os_release
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 Expected in: /usr/local/terrame/lib/libSystem.B.dylib
 in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

如果我再试一次

make macosx

第一个错误会再次出现:

dyld: Symbol not found: _os_release
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /usr/local/terrame/lib/libSystem.B.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
make: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

我以前尝试过安装一个叫做terrame(terrame.org)的Lua扩展程序,所以文件夹路径引用了它...

编辑(回答评论)

which make
/usr/bin/make
点赞