Доморощенный: Httpd не может быть запущен

После обновления моей macOS до Monterey я не могу запустить Apache. Когда я запускаюsudo brew services start httpdкоманда, httpd выглядит запущенным:

      Warning: Taking root:admin ownership of some httpd paths:
  /usr/local/Cellar/httpd/2.4.54_1/bin
  /usr/local/Cellar/httpd/2.4.54_1/bin/httpd
  /usr/local/opt/httpd
  /usr/local/opt/httpd/bin
  /usr/local/var/homebrew/linked/httpd
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: httpd must be run as non-root to start at user login!
==> Successfully started `httpd` (label: homebrew.mxcl.httpd)

Однако, когда я перечисляюbrew services, статус httpd показывает ошибку

      Name          Status     User     File
dnsmasq       none       root     
httpd         error  256 root     ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
mariadb       started    username ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
php           started    username ~/Library/LaunchAgents/homebrew.mxcl.php.plist

/usr/local/var/log/httpderror_log показывает:

      [Sun Oct 16 16:24:04.427782 2022] [mpm_prefork:notice] [pid 124] AH00163: Apache/2.4.54 (Unix) configured -- resuming normal operations
[Sun Oct 16 16:24:04.440562 2022] [core:notice] [pid 124] AH00094: Command line: '/usr/local/opt/httpd/bin/httpd -D FOREGROUND'
[Sun Oct 16 16:27:19.886482 2022] [mpm_prefork:notice] [pid 124] AH00169: caught SIGTERM, shutting down
[Sun Oct 16 16:27:21.002159 2022] [mpm_prefork:notice] [pid 2256] AH00163: Apache/2.4.54 (Unix) configured -- resuming normal operations
[Sun Oct 16 16:27:21.002486 2022] [core:notice] [pid 2256] AH00094: Command line: '/usr/local/opt/httpd/bin/httpd -D FOREGROUND'

ps aux | grep -I httpdпоказывает:

      username          4981   0,0  0,0 34150780    976   ??  S     4:34PM   0:00.00 /usr/local/opt/httpd/bin/httpd -D FOREGROUND
username          4980   0,0  0,0 34156924    972   ??  S     4:34PM   0:00.00 /usr/local/opt/httpd/bin/httpd -D FOREGROUND
username          4978   0,0  0,0 34166140    968   ??  S     4:34PM   0:00.00 /usr/local/opt/httpd/bin/httpd -D FOREGROUND
username          4977   0,0  0,0 34155900    960   ??  S     4:34PM   0:00.00 /usr/local/opt/httpd/bin/httpd -D FOREGROUND
username          4931   0,0  0,0 34145800   2860   ??  Ss    4:34PM   0:00.03 /usr/local/opt/httpd/bin/httpd -D FOREGROUND
username          5394   0,0  0,0 34122868    852 s000  R+    4:40PM   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox -i httpd
username          4982   0,0  0,0 34156924    948   ??  S     4:34PM   0:00.00 /usr/local/opt/httpd/bin/httpd -D FOREGROUND

which -a apachectlкоманда показывает некоторые повторяющиеся значения:

      /usr/local/bin/apachectl
/usr/local/bin/apachectl
/usr/sbin/apachectl

Похоже, между ними есть какие-то конфликты./usr/local/bin/apachectlи/usr/local/opt/httpd/bin/httpd. Удаление Brew httpd и удаление его папок вручную не работает. Как я могу решить проблему?

0 ответов

Другие вопросы по тегам