[英]Can't restart PHP with homebrew on macOS
我按照官方網站( https://brew.sh/ )的說明成功安裝了自制軟件。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
它安裝在 /opt/homebrew 下,然后我使用brew install php@8.1
安裝了 php
如果我用brew services restart php
,我會收到以下錯誤消息:
Permission denied @ rb_sysopen - /Users/USER/Library/LaunchAgents/homebrew.mxcl.php.plist
我使用 macOS Monterey 12.4
使用 sudo 重新啟動 php 會導致警告:
Warning: php must be run as non-root to start at user login!
有人知道如何解決這個問題嗎?
重新啟動我的 php-fpm 的命令:
brew services restart php@8.1
如果您沒有 brew 服務,請嘗試像這樣安裝它:
brew tap homebrew/services
編輯:通過在仍然在錯誤用戶下運行的子目錄上使用“chown”來解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.