运行mix phx.server时找不到可执行文件`mac_listener`

问题描述 投票:0回答:1

Mac OS Mojave上找不到Mac监听器,尽管已安装。我试图重新编译依赖项并重新安装模块但仍然存在问题。

mix deps.compile file_system返回此错误。

mix deps.compile file_system

14:34:40.227 [info]  Compiling file system watcher for Mac...
==> file_system
c_src/mac/cli.c:1:10: fatal error: 'getopt.h' file not found
#include <getopt.h>
         ^~~~~~~~~~
1 error generated.

14:34:40.469 [error] Could not compile file system watcher for Mac, try to run "clang -framework CoreFoundation -framework CoreServices -Wno-deprecated-declarations c_src/mac/*.c -o priv/mac_listener" manually inside the dependnecy.
macos elixir macos-mojave
1个回答
1
投票

最后解决方案就是这样。

第一

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

然后

mix do deps.get, deps.compile
© www.soinside.com 2019 - 2024. All rights reserved.