mac筆記本編譯go-ethereum報錯CoreServices/CoreServices.h' file not found


查看xcode是否安裝:

$ xcode-select --install 
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

$ xcode-select -p 
/Applications/Xcode.app/Contents/Developer

$ brew config

Clang: 10.0 build 1001
Git: 2.20.1 => /usr/local/bin/git
macOS: 10.14.4-x86_64
CLT: 10.2.0.0.1.1552586384
Xcode: 10.2
CLT headers: 10.2.0.0.1.1552586384

發現xcode已經安裝。

使用命令查看 clang++的 include 搜索路徑(#include <...> search starts here: 后面)。

$ clang++ -E -x c++ - -v < /dev/null

ignoring nonexistent directory "/usr/include/c++/v1"
ignoring nonexistent directory "/usr/include"

發現忽略了不存在的/usr/include。 說明macOS SDK 的頭文件不存在。

安裝llvm:

$ brew install llvm

問題仍然存在。

安裝頭文件:

$ cd /Library/Developer/CommandLineTools/Packages/
$ open macOS_SDK_headers_for_macOS_10.14.pkg

再次編譯go-ethereum, 通過。 問題解決。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM