andig2
Posts: 51
Joined: Wed Oct 31, 2012 9:34 pm

[solved] Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 6:28 pm

This is what happens:

Code: Select all

[email protected]:~/volkszaehler.org $ sudo apt-get install php-cgi libapache2-mod-proxy-html
Reading package lists... Done
Building dependency tree
Reading state information... Done
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 information may help to resolve the situation:

The following packages have unmet dependencies:
 libapache2-mod-proxy-html : Depends: apache2-bin (= 2.4.10-10+deb8u7) but 2.4.25-1 is to be installed
E: Unable to correct problems, you have held broken packages.
apache2-bin is not held, really confused what has happened here?
Last edited by andig2 on Sat Jan 14, 2017 9:46 am, edited 1 time in total.

andig2
Posts: 51
Joined: Wed Oct 31, 2012 9:34 pm

Re: Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 6:50 pm

To add, this is my sources.list:

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
deb http://httpredir.debian.org/debian jessie-backports main contrib non-free
apt preferences:

Code: Select all

Package: *
Pin: release n=jessie
Pin-Priority: 600
stretch was necessary for getting LetsEncrypt certbot up and running- does that potentially screw up the dependencies?

User avatar
rpdom
Posts: 15583
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 6:51 pm

What does "apt-cache policy libapache2-mod-proxy-html apache2-bin" show?

Both packages are at version 2.4.10-10+deb8u7 in Raspbian Jessie, but apache2-bin seems to be at version 2.4.25-1 in Raspbian Stretch. There doesn't appear to be a corresponding libapache2-mod-proxy-html package in Stretch.

Looking at the description of the package it looks like you don't even need it any more. It is a dummy transitional package that just ensure that apache2-bin is installed. You can probably safely delete it.

User avatar
rpdom
Posts: 15583
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 6:54 pm

To follow up, my apt preferences is

Code: Select all

Package: *
Pin: release n=Stretch
Pin-Priority: 10
By pinning Stretch down to 10 it won't install packages from there unless I tell it to. Leaving Stretch at the default 500 will probably mean it does try to install from there even though Jessie has an even higher priority.

andig2
Posts: 51
Joined: Wed Oct 31, 2012 9:34 pm

Re: Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 7:37 pm

Here we go:

Code: Select all

[email protected]:~/volkszaehler.org $ apt-cache policy libapache2-mod-proxy-html apache2-bin
libapache2-mod-proxy-html:
  Installed: (none)
  Candidate: 1:2.4.10-10+deb8u7
  Version table:
     1:2.4.10-10+deb8u7 0
        600 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
apache2-bin:
  Installed: 2.4.25-1
  Candidate: 2.4.25-1
  Version table:
 *** 2.4.25-1 0
        500 http://mirrordirector.raspbian.org/raspbian/ stretch/main armhf Packages
        100 /var/lib/dpkg/status
     2.4.10-10+deb8u7 0
        600 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
So your analysis of the versions is right. I can't comment on the transitional package/ not needed part, but

Code: Select all

sudo a2enmod mod_proxy mod_proxy_http
claims that the modules don't exist without it.

I've changed apt preferences to your suggestion but the result is unchanged:

Code: Select all

The following packages have unmet dependencies:
 libapache2-mod-proxy-html : Depends: apache2-bin (= 2.4.10-10+deb8u7) but 2.4.25-1 is to be installed
E: Unable to correct problems, you have held broken packages.
Do I need an update first?

andig2
Posts: 51
Joined: Wed Oct 31, 2012 9:34 pm

Re: Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 7:46 pm

Update: it looks- if I interpret the *** in the output correctly, as if apt is still preferring stretch? Arggh, I see- it already did install the stretch version apparently?

Code: Select all

[email protected]:~/volkszaehler.org $ apt-cache policy libapache2-mod-proxy-html apache2-bin
libapache2-mod-proxy-html:
  Installed: (none)
  Candidate: 1:2.4.10-10+deb8u7
  Version table:
     1:2.4.10-10+deb8u7 0
        500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
apache2-bin:
  Installed: 2.4.25-1
  Candidate: 2.4.25-1
  Version table:
 *** 2.4.25-1 0
         10 http://mirrordirector.raspbian.org/raspbian/ stretch/main armhf Packages
        100 /var/lib/dpkg/status
     2.4.10-10+deb8u7 0
        500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages

andig2
Posts: 51
Joined: Wed Oct 31, 2012 9:34 pm

Re: Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 7:52 pm

... and after removing apache I'm in the same spot. Stretch takes precedence:

Code: Select all

[email protected]:~/volkszaehler.org $ sudo apt install -t jessie apache2

The following packages have unmet dependencies:
 apache2 : Depends: apache2-bin (= 2.4.10-10+deb8u7) but 2.4.25-1 is to be installed
           Depends: apache2-data (= 2.4.10-10+deb8u7) but 2.4.25-1 is to be installed
E: Unable to correct problems, you have held broken packages.

User avatar
rpdom
Posts: 15583
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 7:58 pm

andig2 wrote:Do I need an update first?
Yes, you should.
Arggh, I see- it already did install the stretch version apparently?
Yes, it looks like it did.
... and after removing apache I'm in the same spot. Stretch takes precedence:
Strange. I just did a dummy run install of apache2-bin on my Pi and it said it would use the Jessie version.

Code: Select all

$ sudo apt-get -s install apache2-bin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0
Suggested packages:
  www-browser apache2-doc apache2-suexec-pristine apache2-suexec-custom
The following NEW packages will be installed:
  apache2-bin libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0
0 upgraded, 6 newly installed, 0 to remove and 1 not upgraded.
Inst libapr1 (1.5.1-3 Raspbian:stable [armhf])
Inst libaprutil1 (1.5.4-1 Raspbian:stable [armhf])
Inst liblua5.1-0 (5.1.5-7.1 Raspbian:stable [armhf])
Inst libaprutil1-dbd-sqlite3 (1.5.4-1 Raspbian:stable [armhf])
Inst libaprutil1-ldap (1.5.4-1 Raspbian:stable [armhf])
Inst apache2-bin (2.4.10-10+deb8u7 Raspbian:stable [armhf])
Conf libapr1 (1.5.1-3 Raspbian:stable [armhf])
Conf libaprutil1 (1.5.4-1 Raspbian:stable [armhf])
Conf liblua5.1-0 (5.1.5-7.1 Raspbian:stable [armhf])
Conf libaprutil1-dbd-sqlite3 (1.5.4-1 Raspbian:stable [armhf])
Conf libaprutil1-ldap (1.5.4-1 Raspbian:stable [armhf])
Conf apache2-bin (2.4.10-10+deb8u7 Raspbian:stable [armhf])

User avatar
rpdom
Posts: 15583
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Apache: Can't install mod_proxy_html?

Fri Jan 13, 2017 9:11 pm

andig2 wrote: So your analysis of the versions is right. I can't comment on the transitional package/ not needed part, but

Code: Select all

sudo a2enmod mod_proxy mod_proxy_http
claims that the modules don't exist without it.

Code: Select all

sudo a2enmod proxy_http proxy
You don't need the "mod_".

andig2
Posts: 51
Joined: Wed Oct 31, 2012 9:34 pm

[Solved] Apache: Can't install mod_proxy_html?

Sat Jan 14, 2017 9:41 am

Thank you for all the advice- I finally got it. I have php7 installed from stretch- that seems to force the apache from stretch. It seems to proxy modules are now bundled with apache core and the install therefore no longer necessary- which I didn't notice due to the wrong a2enmod command.

I finally realized that when I had removed apache and started from scratch.

All good now, thanks!

Return to “Raspbian”