基本的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,這個版本的bump只會導致librdkafka1安裝中斷。apt-get install librdkafka1`由於libssl的依賴性而在Debian 9.x上失敗
這是最新的官方泊塢窗的Debian 9圖像容易複製:
docker pull debian:9
docker run --rm -it debian:9
然後內的VM
cat /etc/debian_version
# 9.3
apt-get update
# Get basics to setup Confluent repository
apt-get install -y wget gnupg2 software-properties-common
wget -qO - http://packages.confluent.io/deb/4.0/archive.key | apt-key add -
add-apt-repository "deb [arch=amd64] http://packages.confluent.io/deb/4.0 stable main"
apt-get update
然後apt-cache policy librdkafka1
結果:
librdkafka1:
Installed: (none)
Candidate: 0.11.1~1confluent4.0.0-1
Version table:
0.11.1~1confluent4.0.0-1 500
500 http://packages.confluent.io/deb/4.0 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
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尚未爲Debian 9提供librdkafka軟件包,但會盡快提供。我建議你在源代碼之前建立librdkafka,或者檢查標準的Debian軟件包(雖然它很可能會有一箇舊版本的librdkafka)。 – Edenhill