libmysqlclient-dev will not install with libssl1.0-dev

Bug #1861304 reported by Chris Salch on 2020-01-29
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
High
Unassigned
Bionic
High
Unassigned

Bug Description

There seems to be a conflict with different versions of libssl and libmysqlclient that did not exist in the past. As of https://launchpad.net/ubuntu/+source/mysql-5.7/5.7.29-0ubuntu0.18.04.1 we are unable to install libmysqlclient-dev and libssl1.0-dev at the same time:

Example:

testu18@testu18:~$ sudo apt install libmysqlclient-dev libssl1.0-dev
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:
 libmysqlclient-dev : Depends: libssl-dev (>= 1.1.1-1ubuntu2.1~18.04.5~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

and

testu18@testu18:~$ sudo apt install libmysqlclient-dev libssl1.0-dev libssl-dev
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:
 libssl-dev : Conflicts: libssl1.0-dev but 1.0.2n-1ubuntu5.3 is to be installed
 libssl1.0-dev : Conflicts: libssl-dev but 1.1.1-1ubuntu2.1~18.04.5 is to be installed
E: Unable to correct problems, you have held broken packages.

This worked in previous versions.

Possibly releated: http://launchpadlibrarian.net/461558368/mysql-5.7_5.7.28-0ubuntu0.18.04.4_5.7.29-0ubuntu0.18.04.1.diff.gz

tags: added: indeed
Dave Chiluk (chiluk) on 2020-01-29
Changed in mysql-5.7 (Ubuntu):
importance: Undecided → High
milestone: none → bionic-updates
tags: added: regression-release
Dave Chiluk (chiluk) on 2020-01-29
Changed in mysql-5.7 (Ubuntu Bionic):
milestone: none → bionic-updates
Changed in mysql-5.7 (Ubuntu):
milestone: bionic-updates → none
Changed in mysql-5.7 (Ubuntu Bionic):
importance: Undecided → High
Dave Chiluk (chiluk) wrote :

Targeting for bionic, but I haven't checked the other releases.

I will say it's odd that there's a
libssl-dev
and
libssl-doc
but not a
libssl

only a libssl1.0 and a libssl1.1.
I'm sure there's reasons, and I'm not privy to them.

Marc Deslauriers (mdeslaur) wrote :

Ubuntu 18.04 contains two versions of Openssl: openssl 1.1 and openssl 1.0.

Unfortunately, upstream MySQL now requires it to be linked against OpenSSL 1.1, where previously it used an internal ssl library.

It is no longer possible to use openssl 1.0 concurrently with MySQL.

What is requiring you to install libssl1.0-dev instead of libssl-dev?

Changed in mysql-5.7 (Ubuntu Bionic):
status: New → Incomplete
Chris Salch (emeraldd-chris) wrote :

We have an automated install script that was carried across from 16.04 based systems. I suspect that this may boil down to the odd naming convention on the libssl pacakages (i.e. the lack of a libssl package while there is a dev one ...). I'm trying out the libssl1.1 package right now and it looks like that will work. Would a separate bug need to be filed to ask about that naming issue?

Dimitri John Ledkov (xnox) wrote :

There are no naming issues. src:openssl transitioned from providing 1.0.2x series to providing 1.1.1x series by default.

In bionic, when src:openssl moved to provide 1.1.1x series, a separate src:openssl1.0 package was introduced to provide (temporarily) libssl1.0-dev in bionic only, which is equivalent to libssl-dev in xenial and earlier.

On all systems, one should install libssl-dev which will always provide the default openssl/ssl.h implementation used by most software in a given release. Which is 1.0.2x on xenial, yet 1.1.1x on bionic and up.

Changed in mysql-5.7 (Ubuntu):
status: New → Invalid
Changed in mysql-5.7 (Ubuntu Bionic):
status: Incomplete → Invalid
Chris Salch (emeraldd-chris) wrote :

So, the fact that there is not libssl package doesn't constitute a naming problem? My expectation has been that there should be a <package> and matching <package>-dev but that's not the case here unless I'm very mistaken.

Colin Watson (cjwatson) wrote :

Runtime libraries can't usefully use metapackages the way you're proposing, and it's not conventional to do so. Whether a dependency is on libssl1.0.0 or libssl1.1 depends on what the binaries depending on them were built against; forcibly dropping in libssl1.1 would result in broken programs.

Upgrading from libssl1.0.0 to libssl1.1 was done by progressively rebuilding binaries against libssl1.1, noting that the *runtime* library packages libssl1.0.0 and libssl1.1 can be installed together (unlike their -dev counterparts).

Download full text (3.1 KiB)

Thanks for the technical aspect there. That's not something I'd run into
in other cases.

On Wed, Jan 29, 2020, 12:01 Colin Watson <email address hidden> wrote:

> Runtime libraries can't usefully use metapackages the way you're
> proposing, and it's not conventional to do so. Whether a dependency is
> on libssl1.0.0 or libssl1.1 depends on what the binaries depending on
> them were built against; forcibly dropping in libssl1.1 would result in
> broken programs.
>
> Upgrading from libssl1.0.0 to libssl1.1 was done by progressively
> rebuilding binaries against libssl1.1, noting that the *runtime* library
> packages libssl1.0.0 and libssl1.1 can be installed together (unlike
> their -dev counterparts).
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1861304
>
> Title:
> libmysqlclient-dev will not install with libssl1.0-dev
>
> Status in mysql-5.7 package in Ubuntu:
> Invalid
> Status in mysql-5.7 source package in Bionic:
> Invalid
>
> Bug description:
> There seems to be a conflict with different versions of libssl and
> libmysqlclient that did not exist in the past. As of
> https://launchpad.net/ubuntu/+source/mysql-5.7/5.7.29-0ubuntu0.18.04.1
> we are unable to install libmysqlclient-dev and libssl1.0-dev at the
> same time:
>
> Example:
>
> testu18@testu18:~$ sudo apt install libmysqlclient-dev libssl1.0-dev
> 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:
> libmysqlclient-dev : Depends: libssl-dev (>= 1.1.1-1ubuntu2.1~18.04.5~)
> but it is not going to be installed
> E: Unable to correct problems, you have held broken packages.
>
>
> and
>
> testu18@testu18:~$ sudo apt install libmysqlclient-dev libssl1.0-dev
> libssl-dev
> 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:
> libssl-dev : Conflicts: libssl1.0-dev but 1.0.2n-1ubuntu5.3 is to be
> installed
> libssl1.0-dev : Conflicts: libssl-dev but 1.1.1-1ubuntu2.1~18.04.5 is
> to be installed
> E: Unable to correct problems, you have held broken packages.
>
>
>
> This worked in previous versions.
>
> Possibly releated:
>
> http://launchpadlibrarian.net/461558368/mysql-5.7_5.7.28-0ubuntu0.18.04.4_5.7.29-0ubuntu0.18.04.1.diff.gz
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1861304/+subsc...

Read more...

When was this conflict between libmysqlclient-dev and libssl1.0-dev introduced?

It's causing us big problems because when compiling Asterisk 11 from source it requires both. Does anyone know of a solution?

Carlos Quiros (qlands) wrote :

Any idea when this could be fixed?

Robie Basak (racb) wrote :

> It's causing us big problems because when compiling Asterisk 11 from source it requires both. Does anyone know of a solution?

Please see the previous comments. You can build against libssl-dev, not libssl1.0-dev. Ubuntu Bionic builds against OpenSSL 1.1 for almost everything. If you must use the older OpenSSL 1.0 and also link against MySQL, then you'll need a previous release of Ubuntu such as 16.04 which is still in support. See https://wiki.ubuntu.com/Releases for relevant dates.

> Any idea when this could be fixed?

This is not a bug in Ubuntu, so there is no fix proposed or planned.

tags: added: bionic-openssl-1.1

Asterisk 11 will not compile against libssl-dev.

What seems strange is I believe we previously had both libssl1.0-dev and libmysqlclient-dev installed on an Ubuntu 18 server. Was the conflict introduced in an update to Ubuntu 18? If so then changing such things within a version doesn't seem ideal.

Robie Basak (racb) wrote :

I see. There were changes related to OpenSSL 1.1 - see bug 1797386. I didn't realise libssl1.0-dev actually shipped original in Bionic. In that case, I think your report could be a valid regression report during Bionic's lifetime itself, so I'll adjust the bug metadata accordingly.

Unfortunately I'm not sure we can do anything about it now though, so I'll change the bug status to Won't Fix to reflect that we currently do not have any plan to change this. Further discussion welcome, but any concrete proposal needs to take the other implications into account.

Changed in mysql-5.7 (Ubuntu Bionic):
status: Invalid → Won't Fix
tags: added: regression-update
removed: regression-release
Robie Basak (racb) wrote :

Some further information. libmysqlclient-dev as released in Bionic originally did not depend on libssl-dev as MySQL at that time used an embedded version of yassl. However MySQL upstream moved to OpenSSL in their stable 5.7 series, so Ubuntu had to switch to building against the packaged OpenSSL. This is what introduced the libssl-dev requirement into libmysqlclient-dev.

I see, thank you. It's a shame that MySQL would make such a change within a major version. We have worked as follows, though it's a bit of a nasty solution:

apt install libmysqlclient-dev # will install libssl-dev as a dependency
apt download libssl1.0-dev # download required package manually
dpkg -r --force-depends libssl-dev # remove libssl-dev without removing libmysqlclient-dev
dpkg -i libssl1.0-dev_1.0.2n-1ubuntu5.3_amd64.deb # install libssl1.0-dev manually

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers