php7.0-mbstring : Depends: php7.0-common (= 7.0.4-7ubuntu2) but 7.0.18-0ubuntu0.16.04.1 is to be installed

Bug #1705393 reported by daamien
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php7.0 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have the lastest php-common package in an up-to-date Xenial server

# apt policy php7.0-common
php7.0-common:
  Installed: 7.0.18-0ubuntu0.16.04.1
  Candidate: 7.0.18-0ubuntu0.16.04.1
  Version table:
 *** 7.0.18-0ubuntu0.16.04.1 500
        500 https://mirrors.gandi.net/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     7.0.15-0ubuntu0.16.04.4 500
        500 https://mirrors.gandi.net/ubuntu xenial-security/main amd64 Packages
     7.0.4-7ubuntu2 500
        500 https://mirrors.gandi.net/ubuntu xenial/main amd64 Packages

I can't install php7.0-mbstring :

# apt install php7.0-mbstring
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:
 php7.0-mbstring : Depends: php7.0-common (= 7.0.4-7ubuntu2) but 7.0.18-0ubuntu0.16.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

Revision history for this message
Nish Aravamudan (nacc) wrote :

Hello and thank you for filling this bug report. I expect this is a problem with your mirror.

Can you provide `apt-cache policy php7.0-mbstring`?

Changed in php7.0 (Ubuntu):
status: New → Incomplete
Revision history for this message
daamien (damien-taadeem) wrote :

Hi

Thanks for the quick reply !

Here the apt update and apt policy outputs :

$ sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 https://mirrors.gandi.net/ubuntu xenial-backports InRelease
Hit:3 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
Ign:4 https://mirrors.gandi.net/gandi/ubuntu xenial InRelease
Hit:5 https://mirrors.gandi.net/ubuntu xenial-proposed InRelease
Hit:6 https://mirrors.gandi.net/ubuntu xenial-security InRelease
Hit:7 https://mirrors.gandi.net/ubuntu xenial-updates InRelease
Get:8 https://mirrors.gandi.net/ubuntu xenial InRelease [247 kB]
Hit:8 https://mirrors.gandi.net/ubuntu xenial InRelease
Hit:9 https://mirrors.gandi.net/gandi/ubuntu xenial Release
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

$ sudo apt policy php7.0-mbstring
php7.0-mbstring:
  Installed: (none)
  Candidate: 7.0.4-7ubuntu2
  Version table:
     7.0.4-7ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Should I remove the gandi mirrors ?

Revision history for this message
Nish Aravamudan (nacc) wrote : Re: [Bug 1705393] Re: php7.0-mbstring : Depends: php7.0-common (= 7.0.4-7ubuntu2) but 7.0.18-0ubuntu0.16.04.1 is to be installed

On Thu, Jul 20, 2017 at 3:45 PM, daamien <email address hidden> wrote:
> Hi
>
> Thanks for the quick reply !
>
> Here the apt update and apt policy outputs :
>
> $ sudo apt update
> Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
> Hit:2 https://mirrors.gandi.net/ubuntu xenial-backports InRelease
> Hit:3 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
> Ign:4 https://mirrors.gandi.net/gandi/ubuntu xenial InRelease
> Hit:5 https://mirrors.gandi.net/ubuntu xenial-proposed InRelease
> Hit:6 https://mirrors.gandi.net/ubuntu xenial-security InRelease
> Hit:7 https://mirrors.gandi.net/ubuntu xenial-updates InRelease
> Get:8 https://mirrors.gandi.net/ubuntu xenial InRelease [247 kB]
> Hit:8 https://mirrors.gandi.net/ubuntu xenial InRelease
> Hit:9 https://mirrors.gandi.net/gandi/ubuntu xenial Release
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> All packages are up to date.
>
> $ sudo apt policy php7.0-mbstring
> php7.0-mbstring:
> Installed: (none)
> Candidate: 7.0.4-7ubuntu2
> Version table:
> 7.0.4-7ubuntu2 500
> 500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
>
> Should I remove the gandi mirrors ?

Ok, this is an odd (to me) mix of repositories. Do you have a
xenial-updates/unverse entry in source.list? php7.0-mbstring is in
universe, while php7.0-common is in main.

Revision history for this message
daamien (damien-taadeem) wrote :

these repositories were defined in the default installation provided by the hosting company (gandi.net)

and yes universe is in the source list

/etc/apt$ cat sources.list
deb http://archive.ubuntu.com/ubuntu xenial universe

Revision history for this message
daamien (damien-taadeem) wrote :

The problème remains if I switch to the official repos :

deb http://fr.archive.ubuntu.com/ubuntu/ xenial main restricted universal
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universal
deb http://fr.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universal

I check the php7.0-mbstring package here :

https://packages.ubuntu.com/fr/xenial/php7.0-mbstring

And it says the package depends on php7.0-common (= 7.0.4-7ubuntu2)

which is similary to my apt install error message :

php7.0-mbstring : Depends: php7.0-common (= 7.0.4-7ubuntu2) but 7.0.18-0ubuntu0.16.04.1 is to be installed

Revision history for this message
Nish Aravamudan (nacc) wrote :

On Fri, Jul 21, 2017 at 12:45 PM, daamien <email address hidden> wrote:
> these repositories were defined in the default installation provided by the hosting company (gandi.net)
>
> and yes universe is in the source list
>
> /etc/apt$ cat sources.list
> deb http://archive.ubuntu.com/ubuntu xenial universe

I specifically asked if you had a xenial-updates/universe. The above
is for the *release* pocket of xenial, not xenial-updates. If you do
not have a xenial-updates repository for the universe pocket, then you
can easily get into situations like the above (that is, it appears you
have a xenial-updates repository for main (from which php7.0-common
come) but not for universe (from which php7.0-mbstring comes).

Revision history for this message
Nish Aravamudan (nacc) wrote :

On Fri, Jul 21, 2017 at 1:04 PM, daamien <email address hidden> wrote:
> The problème remains if I switch to the official repos :
>
> deb http://fr.archive.ubuntu.com/ubuntu/ xenial main restricted universal
> deb http://security.ubuntu.com/ubuntu xenial-security main restricted universal
> deb http://fr.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universal

Is the sources.list file localized? "universal" vs. "universe"

Did you run apt-get update first?

> I check the php7.0-mbstring package here :
>
> https://packages.ubuntu.com/fr/xenial/php7.0-mbstring

I do not know why the output is like that, but there is no red dot
next to this dependency:
>
> And it says the package depends on php7.0-common (= 7.0.4-7ubuntu2)

which means it is not a dependency. Looking on xenial, correctly up to date:

$ apt show php7.0-mbstring
Package: php7.0-mbstring
....
Version: 7.0.18-0ubuntu0.16.04.1
Provides: php-mbstring
Depends: php-common (>= 1:33), ucf, php7.0-common (=
7.0.18-0ubuntu0.16.04.1), libc6 (>= 2.14)

> which is similary to my apt install error message :
>
> php7.0-mbstring : Depends: php7.0-common (= 7.0.4-7ubuntu2) but
> 7.0.18-0ubuntu0.16.04.1 is to be installed

I'm 99% sure this is indicating you are trying to install a
php7.0-mbstring from the xenial release pocket (universe component)
and have php7.0-common from the xenial updates pocket (main
component).

Revision history for this message
daamien (damien-taadeem) wrote :

yes 'universal' was a typo from me. Sorry about that.

You are right. It's an issue with the mirrors provided by the hosting company.

This is not a bug, you can close this report.

Thanks a lot for your help and sorry again

Joshua Powers (powersj)
Changed in php7.0 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.