【发布时间】:2021-12-27 15:25:06
【问题描述】:
我刚换用 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 支持,搜索了与此相关的每个页面,但仍然找不到有效的解决方案。
有人遇到过同样的问题吗?请帮忙
【问题讨论】:
标签: c installation homebrew homebrew-cask cunit