macOSmkdir:/usr/var:Operationnotpermitted
版權宣告:本文為 testcs_dn(微wx笑) 原創文章,非商用自由轉載-保持署名-註明出處,謝謝。 https://blog.csdn.net/testcs_dn/article/details/80016887
在 macOS 下配置 PHP 環境,啟動服務時
sudo php-fpm -D
輸出錯誤:
ERROR: failed to open error_log (/usr/var/log/php-fpm.log): No such file or directory (2)
ERROR: failed to post process the configuration
ERROR: FPM initialization failed
於是嘗試建立目錄:
mkdir /usr/var/log/
就看到了這個錯誤:
mkdir: /usr/var: Operation not permitted
這是因為,mac EI Captian系統許可權收緊了,不讓建立了。解決方式:編輯
sudo vi /private/etc/php-fpm.conf
,修改 error_log = /usr/local/var/log/nginx.log,如果行首有分號把它去年,儲存退出。
但可能還有錯誤 ,因為 /usr/local/var/log/ 目錄不存在,這時你可以建立它:
mkdir /usr/local/var/log/
再啟動PHP:
sudo php-fpm -D
OK,問題解決了。
相關文章
- /bin、/sbin、/usr/bin、/usr/sbin、/usr/local/sbin放置可執行檔案的區別
- /usr/bin/python與/usr/bin/env python的區別Python
- python中#!/usr/bin/python與#!/usr/bin/env python的區別Python
- brew update /usr/local is not writable
- Php cli模式下執行報錯/usr/bin/php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/bin/php)PHP模式XMLORMAIUI
- var let cost
- ${VAR:=預設值}和${VAR:-預設值} 區別
- /usr/bin/ld: cannot find -lopenblas
- 變數宣告帶var與不帶var的區別變數
- JavaScript變數宣告帶var與不帶var區別JavaScript變數
- Go 中 type var string 和 type var = string 的區別Go
- -bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: b...Framework
- HTML <var> 標籤HTML
- let var與const
- /usr/bin/expect的簡單使用
- 【jenkins】/usr/bin/env: php: No such file or directoryJenkinsPHP
- [譯] lazy var in ios swiftiOSSwift
- 詳解 let 和 var
- var let const區別
- let const var 區別
- let,const,var區別
- JavaScript全域性作用域下,變數加var和不加var的區別。JavaScript變數
- chown: /usr/local: Operation not permitted問題解決MIT
- Sub-process /usr/bin/dpkg returned an error codeError
- Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql'MySql
- File "/usr/libexec/urlgrabber-ext-down", line 28
- var、const、let 的區別
- var 和 let 的區別
- let與var的區別
- var和public的區別
- Linux 中 /var/spool/postfix/maildropLinuxAI
- 在Linux系統中,預設的標頭檔案搜尋路徑是/usr/include和/usr/local/includLinux
- You don't have write permissions for the /usr/bin directory.
- write /usr/include/openssl/cms.h: no space left on devicedev
- Authentication is required to run /usr/bin/x-terminal-emulator as rootUI
- /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic linkSymbol
- 傑裡之usr_timer 刪除介面【篇】
- var和let/const的區別