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

`由于libssl依赖关系,在Debian 9.x上apt get install librdkafka1`失败,debian,apache-kafka,confluent-platform,Debian,Apache Kafka,Confluent Platform,Basicapt 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

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

这在最新的Docker Debian 9官方图片上很容易复制:

docker pull debian:9
docker run --rm -it debian:9
然后在虚拟机中

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缓存策略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
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
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缓存策略librdkafka1
导致:

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
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
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 get install librdkafka1
会导致:

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
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
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缓存搜索libssl
生成以下内容。请注意,有一个
libssl1.0.2
libssl1.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中。

我认为您的
apt
源代码中有一个错误

正如日志所说,存储库
packages.confluent.io
正在被使用,并在Debian的存储库之上提出了一个新版本

您可以使用
apt show python kafka
或使用
apt cache show python kafka


您是否将dist从
Jessie
升级到
Stretch

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


Confluent尚未为Debian 9提供librdkafka包,但 我们很快就会这样做。我建议您从源代码到 然后,或者检查标准Debian包(最有可能 (不过有一个旧版本的librdkafka)


librdkafka根本不支持Debian 9。这在汇合平台4.1中仍然是正确的。Debian 9仍然没有得到Confluent平台的正式支持:

librdkafka1
已添加到stretch Backport:

要安装:

add-apt-repository "deb http://deb.debian.org/debian stretch-backports main contrib non-free"
apt-get update
apt-get install librdkafka1/stretch-backports
官方合流回购协议中的
librdkafka1
版本不支持Debian 9。从Confluent 5.0开始,Confluent平台本身并不正式支持Debian 9:

好的,我使用Docker Debian 9图像复制了这张照片,并更新了主要帖子。不,这不是从JessiceConfluent升级的,它还没有为Debian 9提供librdkafka包,但很快就会提供。在此之前,我建议您从源代码构建librdkafka,或者检查标准的Debian包(很可能会有旧版本的librdkafka)。