今天启动php@5.6时 遇到了一个问题
servers % brew services start php@5.6
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/ssh/Library/LaunchAgents/homebrew.mxcl.php@5.6.plist` exited with 5.
也看不懂啥错误
后来经过网上一番搜索 说让看一下php-fpm日志
tail -n 10 /usr/local/var/log/php-fpm.log
然后显示这些
[12-Nov-2023 10:38:02] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (48)
[12-Nov-2023 10:38:02] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (48)
[12-Nov-2023 10:38:02] ERROR: FPM initialization failed
[12-Nov-2023 10:38:02] ERROR: FPM initialization failed
[12-Nov-2023 10:38:12] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[12-Nov-2023 10:38:12] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[12-Nov-2023 10:38:12] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[12-Nov-2023 10:38:12] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
有一段大概意思是说 本机的9000端口已经被占用了
然后把 这个端口换成一个其他未被占用的端口就行了
然后重启php-fpm
这样就启动了
然后查询一下端口
这样就可以了