我刚刚切换到 M1 MacBook Air,但在使用 Homebrew 时遇到了问题。我认为安装很顺利,然后我使用给定的命令将其添加到我的路径中:
Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/xxx/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
我也这样做了brew install cunit
,然后当我输入brew list
CUnit 时,那里列出了所以我假设 cunit 的 brew install 工作。
但是当我运行我的 C 测试代码时,这就是我得到的:
test/test.c:3:10: fatal error: 'CUnit/Basic.h' file not found
#include <CUnit/Basic.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [test_compile] Error 1
我已经坐了三天,打电话给Apple支持,搜索了与此相关的每个页面,但仍然找不到有效的解决方案。
有没有人有同样的问题?请帮忙