Como saber como o Apache pode ser quebrado e impedir que o módulo do passageiro ruby instale

2

Estou instalando um aplicativo ruby on rails em um servidor Ubuntu 14.04. Como parte disso, eu preciso instalar o módulo de passageiros para o Apache. Quando vou executar o "passenger-install-apache2-module", recebo uma mensagem dizendo que "Sua instalação do Apache pode estar quebrada". Ele dá alguns comandos sugeridos, mas eles não revelam nenhuma informação útil. A saída completa está abaixo.

Ruby, rails, Apache e RVM já estão instalados. Eu já tentei remover e reinstalar todos eles antes, sem sucesso.

Há alguma coisa em particular que eu precise fazer para ver exatamente o que pode ser quebrado com o Apache ou o passageiro? Eu gostaria de evitar a reinstalação do Apache ou Ruby novamente.

Obrigado antecipadamente!

A saída exata após o script de passageiro mostra que todas as dependências foram atendidas.

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.

Editar: Mais detalhes depois de executar os comandos listados na parte inferior. O /usr/bin/apxs está correto? Não deveria ser apxs2 desde que eu estou usando o apache2?

A execução do comando só produz a mesma saída acima.

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
    
por RedLee 31.07.2014 / 19:01

1 resposta

1

Sua configuração do Apache está quebrada.

Especificamente, você tem um arquivo /etc/apache2/pf.conf que está tentando usar diretivas fornecidas pelo Phusion Passenger, que você ainda não instalou!

Mova esse arquivo para outro lugar temporariamente e execute a instalação. Quando a instalação estiver concluída, você poderá movê-la de volta, se necessário.

    
por 31.07.2014 / 19:11