在ubuntu 12.04上,passenger-install-apache2-module失败

Elm*_*mor 13 ubuntu ruby-on-rails

我安装gem install passenger了我的rails应用程序.现在我试试passenger-install-apache2-module.

我收到错误屏幕:

所需软件的安装说明

  • 要安装Apache 2开发标头:请以root身份运行apt-get install apache2-prefork-dev.
  • 要安装Apache Portable Runtime(APR)开发标头:请以root身份运行apt-get install libapr1-dev.
  • 要安装Apache Portable Runtime Utility(APU)开发标头:请以root身份运行apt-get install libaprutil1-dev.

当我跑步时sudo apt-get install apache2-prefork-dev,我明白了

以下软件包具有未满足的依赖项:apache2-prefork-dev:取决于:apache2.2-common(= 2.2.22-1ubuntu1),但要安装2.2.22-1ubuntu1.1.
E:无法纠正问题,你已经破了包裹.

当我跑步时sudo apt-get update,它没有解决任何问题.错误仍然存​​在.

whe*_*re_ 14

试试这个:

sudo apt-get install apache2-dev
Run Code Online (Sandbox Code Playgroud)

我做到了这一点,并且passenger-install-apache2-module能够传递上述错误.


thi*_*ler 4

尝试

sudo apt-get -f install
sudo apt-get clean all
sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade
Run Code Online (Sandbox Code Playgroud)

然后重试安装 apache 以及所有开发包。您可能必须先卸载 apache。