Passenger + apache 用homebrew安裝錯誤訊息 Support binary PassengerAgent not found

brew 裝的 Passenger 不曉得哪次升級後掛了,檢查apache的錯誤訊息發現:

*** Passenger could not be initialized because of this error: Unable to start Phusion Passenger: 
Support binary PassengerAgent not found 
(tried: /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini/buildout/support-binaries/PassengerAgent 
and /var/root/.passenger/support-binaries/5.0.20/PassengerAgent). 
This probably means that your Passenger installation is broken or incomplete, 
or that your 'PassengerRoot' setting contains the wrong value. 
Please reinstall Passenger or, 
or see https://www.phusionpassenger.com/library/config/apache/reference/#passengerroot to learn how to adjust the setting.
`</pre>

檢查 `httpd.conf` 發現是依照 `brew info` 裡的指示沒錯,但就是不會動。

<pre>`LoadModule passenger_module /usr/local/opt/Passenger/libexec/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/opt/Passenger/libexec/lib/phusion_passenger/locations.ini
PassengerDefaultRuby /usr/bin/ruby 
`</pre>

依照[指示網址](https://www.phusionpassenger.com/library/config/apache/reference/#passengerroot)

<pre>`In all other cases, obtain the correct value by running the following command:
passenger-config --root
`</pre>

然後`passenger-config --root`取得了

<pre>`/usr/local/Cellar/passenger/5.0.20/libexec/src/ruby_supportlib/phusion_passenger/locations.ini
`</pre>

用它來改 `httpd.conf` 就好了...

mm...mm...

留一份備忘:
`/usr/local/Cellar/passenger/5.0.20/libexec/src/ruby_supportlib/phusion_passenger/locations.ini`

<pre>`[locations]
packaging_method=homebrew
bin_dir=/usr/local/Cellar/passenger/5.0.20/libexec/bin
support_binaries_dir=/usr/local/Cellar/passenger/5.0.20/libexec/buildout/support-binaries
lib_dir=/usr/local/Cellar/passenger/5.0.20/libexec/buildout
helper_scripts_dir=/usr/local/Cellar/passenger/5.0.20/libexec/src/helper-scripts
resources_dir=/usr/local/Cellar/passenger/5.0.20/libexec/resources
include_dir=/usr/local/Cellar/passenger/5.0.20/libexec/src
doc_dir=/usr/local/Cellar/passenger/5.0.20/libexec/doc
ruby_libdir=/usr/local/Cellar/passenger/5.0.20/libexec/src/ruby_supportlib
node_libdir=/usr/local/Cellar/passenger/5.0.20/libexec/src/nodejs_supportlib
apache2_module_path=/usr/local/Cellar/passenger/5.0.20/libexec/buildout/apache2/mod_passenger.so
ruby_extension_source_dir=/usr/local/Cellar/passenger/5.0.20/libexec/src/ruby_native_extension
nginx_module_source_dir=/usr/local/Cellar/passenger/5.0.20/libexec/src/nginx_module
build_system_dir=/usr/local/Cellar/passenger/5.0.20/libexec
download_cache_dir=/usr/local/Cellar/passenger/5.0.20/libexec/download_cache