问题描述
尝试在OSX 10.12 Sierra上运行brew upgrade ffmpeg
,但是在安装rust
时出现以下错误:
make: error: unable to find utility "make",not a developer tool or in PATH
xcodebuild: error: SDK "/Library/Developer/CommandLinetools/SDKs/MacOSX10.13.sdk" cannot be located.
clang: error: unable to find utility "clang",not a developer tool or in PATH
但是which make
给出/usr/bin/make
,xcrun make
被识别,并且ls -l /Library/Developer/CommandLinetools/SDKs/MacOSX10.13.sdk
给出了lrwxr-xr-x 1 root wheel 10 Dec 21 2017 /Library/Developer/CommandLinetools/SDKs/MacOSX10.13.sdk -> MacOSX.sdk
如何强制rust
安装使用/usr/bin/make
而不是XTools安装?还是其他的东西。
编辑
我有rustc 1.46.0
,这是Homebrew想要的./configure --prefix=/usr/local/Cellar/rust/1.46.0 --release-channel=stable
解决方法
编辑Homebrew公式brew edit rust
并注释该行ENV["SDKROOT"] = MacOS.sdk_path
然后可以安装Rust(它很长)。