安装passenger-install-apache2-module错误

时间:2014-07-14 16:55:52

标签: apache passenger

我安装了Ubuntu服务器14.04,并且我已经安装了Apache和RVM,并运行以下命令。

rvm all do gem install --no-rdoc --no-ri rails
rvm all do gem install --no-rdoc --no-ri passenger
passenger-install-apache2-module

然后我收到一条错误

Your Apache installation might be broken

You are about to install Phusion Passenger against the following Apache installation:

apxs2: /usr/bin/apxs2

However, this Apache installation appears to be broken, so this installer cannot continue.  To find out why this installer thinks the above Apache installation is broken, run:

export ORIG_PATH="$PATH"
rvmsudo -E /bin/bash
export PATH="$ORIG_PATH"
/usr/local/rvm/gems/ruby-2.1.2/wrappers/ruby /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.45/bin/passenger-config --detect-apache2

因此,如果我运行这些命令,我​​会收到以下消息。

--> Cannot detect default config file location!
Cannot find a useable Apache installation using /usr/bin/apxs.

Final autodetection results
Sorry, this program cannot find an Apache installation.

To install Apache, please run the following. It will tell you how to install Apache.
/usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.45/bin/passenger-install-apache2-module

最后一行基本上就是上面启动所有这一切的命令。所以请有人帮助我!

这是请求的完整输出。

Looking for possible Apache installations...
 --> Looking for /usr/local/rvm/gems/ruby-2.1.2/bin/apxs2: not found
 --> Looking for /usr/local/rvm/gems/ruby-2.1.2@global/bin/apxs2: not found
 --> Looking for /usr/local/rvm/rubies/ruby-2.1.2/bin/apxs2: not found
 --> Looking for /usr/local/sbin/apxs2: not found
 --> Looking for /usr/local/bin/apxs2: not found
 --> Looking for /usr/sbin/apxs2: not found
 --> Looking for /usr/bin/apxs2: found
 --> Looking for /sbin/apxs2: not found
 --> Looking for /bin/apxs2: not found
 --> Looking for /usr/games/apxs2: not found
 --> Looking for /usr/local/games/apxs2: not found
 --> Looking for /usr/local/rvm/bin/apxs2: not found
 --> Looking for /usr/local/rvm/gems/ruby-2.1.2/bin/apxs: not found
 --> Looking for /usr/local/rvm/gems/ruby-2.1.2@global/bin/apxs: not found
 --> Looking for /usr/local/rvm/rubies/ruby-2.1.2/bin/apxs: not found
 --> Looking for /usr/local/sbin/apxs: not found
 --> Looking for /usr/local/bin/apxs: not found
 --> Looking for /usr/sbin/apxs: not found
 --> Looking for /usr/bin/apxs: found
 --> Looking for /sbin/apxs: not found
 --> Looking for /bin/apxs: not found
 --> Looking for /usr/games/apxs: not found
 --> Looking for /usr/local/games/apxs: not found
 --> Looking for /usr/local/rvm/bin/apxs: not found
1 symlink duplicate(s) detected; ignoring them.

Analyzing /usr/bin/apxs...
Detecting main Apache executable...
 --> Looking for /usr/bin/apache2: not found
 --> Looking for /usr/sbin/apache2: found
Detecting version...
 --> 2.4.7
Detecting control command...
 --> Looking for /usr/bin/apache2ctl: not found
 --> Looking for /usr/bin/apachectl2: not found
 --> Looking for /usr/bin/apachectl: not found
 --> Looking for /usr/sbin/apache2ctl: found
Detecting configuration file location...
AH00526: Syntax error on line 5 of /etc/apache2/pf.conf:
Invalid command 'RailsEnv', perhaps misspelled or defined by a module not included in the server configuration
AH00526: Syntax error on line 5 of /etc/apache2/pf.conf:
Invalid command 'RailsEnv', perhaps misspelled or defined by a module not included in the server configuration
 --> Cannot detect default config file location!
Cannot find a usable Apache installation using /usr/bin/apxs.

Final autodetection results
Sorry, this program cannot find an Apache installation.

To install Apache, please run the following. It will tell you how to install Apache.

   /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/bin/passenger-install-apache2-module

If you are sure that you have Apache installed, please read the documentation:
https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#forcing_location_of_command_line_tools_and_dependencies

0 个答案:

没有答案