I've installed gem install passenger
for my rails app. Now I try passenger-install-apache2-module
.
I get errors screen:
Installation instructions for required software
- To install Apache 2 development headers: Please run apt-get install apache2-prefork-dev as root.
- To install Apache Portable Runtime (APR) development headers: Please run apt-get install libapr1-dev as root.
- To install Apache Portable Runtime Utility (APU) development headers: Please run apt-get install libaprutil1-dev as root.
When I run sudo apt-get install apache2-prefork-dev
, I get
The following packages have unmet dependencies: apache2-prefork-dev : Depends: apache2.2-common (= 2.2.22-1ubuntu1) but 2.2.22-1ubuntu1.1 is to be installed.
E: Unable to correct problems, you have held broken packages.
When I run sudo apt-get update
, it doesn't solve anything. The error still exists.
Try this:
sudo apt-get install apache2-dev
I did that and passenger-install-apache2-module was able to pass the mentioned errors.
For me, the fix was to re-enable the precise-updates
repository - I had disabled it in the Update Manager - and updating the system after that.
(I would have liked to only install important security updates, that's why I had disabled it in the first place.)
Try
sudo apt-get -f install
sudo apt-get clean all
sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade
Then retry installing apache, plus all the dev packages. You may have to uninstall apache first.
Precise回购中还有一个预先制作的乘客套餐:
apt-get install libapache2-mod-passenger
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.