由于libssl依赖性,在Debian 9.x上`apt-get install librdkafka1`失败 [英] `apt-get install librdkafka1` fails on Debian 9.x due to libssl dependency
问题描述
Basic apt-get install librdkafka1
在Debian 8.x上有效,但在Debian 9.x上失败.这看起来像关于libssl的依赖版本问题. Debian 8.x具有libssl1.0.0,而Debian 9.x具有libssl1.0.2和libssl1.1,但是没有libssl1.0.0,并且此版本增加只会导致librdkafka1安装中断.
Basic apt-get install librdkafka1
works on Debian 8.x but fails on Debian 9.x. This looks like a dependency version issue regarding libssl. Debian 8.x had libssl1.0.0 and Debian 9.x has libssl1.0.2 and libssl1.1, but no libssl1.0.0 and this version bump just causes the librdkafka1 install to break.
这在最新的官方Docker Debian 9映像上很容易重现:
This is easily reproducible on the latest official Docker Debian 9 image:
docker pull debian:9
docker run --rm -it debian:9
然后在VM中
cat /etc/debian_version
# 9.4
apt-get update
# Get basics to setup Confluent repository
apt-get install -y wget gnupg2 software-properties-common libssl1.0.2
wget -qO - http://packages.confluent.io/deb/4.1/archive.key | apt-key add -
add-apt-repository "deb [arch=amd64] http://packages.confluent.io/deb/4.1 stable main"
apt-get update
apt-cache policy libssl1.0.2
结果为:
libssl1.0.2:
Installed: 1.0.2l-2+deb9u3
Candidate: 1.0.2l-2+deb9u3
Version table:
*** 1.0.2l-2+deb9u3 500
500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
100 /var/lib/dpkg/status
1.0.2l-2+deb9u2 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
apt-cache policy librdkafka1
结果为:
librdkafka1:
Installed: (none)
Candidate: 0.11.4~1confluent4.1.0-1
Version table:
0.11.4~1confluent4.1.0-1 500
500 http://packages.confluent.io/deb/4.1 stable/main amd64 Packages
0.9.3-1 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
apt-get install librdkafka1
结果为:
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:
librdkafka1 : Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
apt-cache search libssl
产生以下内容.请注意,有一个libssl1.0.2
和libssl1.1
但没有libssl1.0.0
apt-cache search libssl
produces the following. Note that there is a libssl1.0.2
and libssl1.1
but no libssl1.0.0
libssl-ocaml - OCaml bindings for OpenSSL (runtime)
libssl-ocaml-dev - OCaml bindings for OpenSSL
libssl-dev - Secure Sockets Layer toolkit - development files
libssl-doc - Secure Sockets Layer toolkit - development documentation
libssl1.1 - Secure Sockets Layer toolkit - shared libraries
libssl1.0-dev - Secure Sockets Layer toolkit - development files
libssl1.0.2 - Secure Sockets Layer toolkit - shared libraries
更新:Confluent 4.1,librdkafka 0.11.4和Debian 9.4仍然存在此问题.
UPDATE: This issue is still present with Confluent 4.1, librdkafka 0.11.4 and Debian 9.4.
推荐答案
librdkafka1
已添加到拉伸反向端口:
librdkafka1
has been added to stretch-backports:
https://packages.debian.org/stretch-backports/librdkafka1
要安装:
add-apt-repository "deb http://deb.debian.org/debian stretch-backports main contrib non-free"
apt-get update
apt-get install librdkafka1/stretch-backports
Confluent官方仓库中的librdkafka1
版本不支持Debian9.从Confluent 5.0开始,Confluent Platform本身不正式支持Debian 9:
https://docs.confluent.io/current/installation/system-requirements.html#system-requirements
The version of librdkafka1
in the official Confluent repo doesn't support Debian 9. Confluent Platform itself doesn't officially support Debian 9 as of Confluent 5.0:
https://docs.confluent.io/current/installation/system-requirements.html#system-requirements
这篇关于由于libssl依赖性,在Debian 9.x上`apt-get install librdkafka1`失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!