我正在安装一个Ruby on Rails应用程序到Ubuntu 14.04服务器。 作为它的一部分,我需要安装Apache的乘客模块。 当我运行“passenger-install-apache2-module”时,收到一条消息:“您的Apache安装可能会中断”。 它提供了一些build议的命令,但是它们没有显示任何有用的信息。 完整的输出如下。
Ruby,rails,Apache和RVM都已经安装完毕。 我已经尝试在现在之前删除并重新安装它们,但没有成功。
有什么特别的,我需要做的,看看究竟可能会破坏与Apache或乘客? 我想避免重新安装Apache或Ruby。
提前致谢!
乘客脚本之后的确切输出显示所有的依赖性已经被满足。
Sanity checking Apache installation... AH00526: Syntax error on line 10 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 10 of /etc/apache2/pf.conf: Invalid command 'RailsEnv', perhaps misspelled or defined by a module not included in the server configuration 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" /home/azureuser/.rvm/gems/ruby-2.1.2/wrappers/ruby /home/azureuser/.rvm/gems/ruby- 2.1.2/gems/passenger-4.0.48/bin/passenger-config --detect-apache2 It is also possible that your system has multiple Apache installations, and that you are simply compiling Phusion Passenger against the wrong Apache install. If this is the case, then the above command will also advise you about what to do.
编辑:运行底部列出的命令后的进一步细节。 /usr/bin/apxs是否正确? 因为我使用的是Apache2,不应该是apxs2吗?
运行它所提供的命令只会产生与上面相同的输出。
Detecting configuration file location... AH00526: Syntax error on line 10 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 10 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. /home/azureuser/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.48/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
您的Apacheconfiguration已损坏。
具体来说,你有一个文件/etc/apache2/pf.conf ,它正在尝试使用Phusion Passenger提供的指令,你还没有安装!
暂时将这个文件移到其他地方,然后运行安装。 安装完成后,可以根据需要将其移回。