由于libssl依赖,{apt-get install librdkafka1`在Debian 9.x上失败

时间:2017-06-24 02:38:46

标签: debian apache-kafka confluent-kafka

基本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安装中断。

这在最新的官方Docker Debian 9图像上很容易重现:

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.2libssl1.1但没有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仍然存在此问题。

3 个答案:

答案 0 :(得分:2)

librdkafka1已添加到拉伸回传:

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

答案 1 :(得分:1)

仅供参考,主要的librdkafka维护者Edenhill在评论中回答了这个问题:

  

Confluent尚未为Debian 9提供librdkafka软件包,但是   很快就会这样做。我建议你从源代码构建librdkafka直到   然后,或检查标准的Debian软件包(最有可能   有一个旧版本的librdkafka虽然)

librdkafka根本不支持Debian 9.从Confluent Platform 4.1开始,这仍然是正确的。 Debian 9仍然没有得到Confluent Platform的正式支持:https://docs.confluent.io/current/installation/installing_cp.html

答案 2 :(得分:0)

我认为您的OtherActivity来源存在错误。

正如日志所说,存储库apt正在被使用并在Debian的存储库上提出新版本。

您可以使用packages.confluent.io或使用apt show python-kafka

的缓存查看包的相关性列表

apt-cache show python-kafkadist-upgradeJessie了吗?