Cannot install apache2-dev package in Debian 9

As part of setting up a Django server, I went ahead an installed Apache2 on my Debian server. The instructions in the Django site says to install wsgi and the wsgi site says to install the apache2-dev package. However, when I tried to do

apt-get install apache2-dev

I get this error:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following packages have unmet dependencies:
apache2-dev : Depends: libapr1-dev but it is not going to be installed
Depends: libaprutil1-dev but it is not going to be installed
Depends: debhelper (>= 9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Is there something I'm missing here?

2 Replies

Hey there,

I tested this out on my own Linode and though I initially encountered some issues originally, updating and upgrading before the install allowed those packages to successfully. I was able to do this with the following command:

 sudo apt-get update && sudo apt-get upgrade

That being said, the errors you're seeing were a little different from mine and I wasn't able to replicate this exactly. I was, however, able to find some more information on the subject where someone had encountered nearly the exact same errors and was able to resolve this using the aptitude package management interface:

Aptitude Solution

I hope that helps!

The solution in the linked works, it looks like there were some components that needed to be downgraded. Thanks!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct