项目场景
尝试在mac的m1版本上进行nginx使用
问题描述
通过brew安装nginx后,尝试启动nginx总是无效或错误,以下都是无效的指令,不正常的结果,可作为错误判断依据之一:
(base) khunone@wangzhaokundeMacBook-Pro ~ % nginx
zsh: killed nginx
(base) khunone@wangzhaokundeMacBook-Pro ~ % brew services start nginx
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/khunone/Library/LaunchAgents/homebrew.mxcl.nginx.plist` exited with 5.
(base) khunone@wangzhaokundeMacBook-Pro etc % brew services start nginx
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/khunone/Library/LaunchAgents/homebrew.mxcl.nginx.plist` exited with 5.
(base) khunone@wangzhaokundeMacBook-Pro ~ % launchctl load /opt/homebrew/Cellar/nginx/1.21.6_1/homebrew.mxcl.nginx.plist
Load failed: 5: Input/output error

在mac的M1芯片上,通过brew安装nginx时遇到启动问题。错误可能源于brew版本过低。解决方法包括更新brew至3.0.0以上版本,使用国内镜像源重新安装,然后成功安装nginx并验证其正常启动。
最低0.47元/天 解锁文章
3524

被折叠的 条评论
为什么被折叠?



