无效的keyring:hadoop gpg密钥是否错误?

lyfkaqu1  于 2021-05-27  发布在  Hadoop
关注(0)|答案(1)|浏览(524)

我正在使用debian:9 image 然后做以下工作

FROM debian:9

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
      openjdk-8-jdk \
      net-tools \
      curl \
      netcat \
      gnupg \
      vim \
      wget \
      unzip

ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

RUN curl -O https://dist.apache.org/repos/dist/release/hadoop/common/KEYS

RUN gpg --import KEYS

它失败了

gpg: invalid armor header: mQINBF9U5ZcBEADJS2a8ihhZtN1wXOJfyLZreuHL9HJxRvogQbhrhpFQrKAusdf2\n
gpg: CRC error; 95D523 - 51AC03
gpg: packet(7) with unknown version 103
gpg: read_block: read error: Invalid packet
gpg: import from 'KEYS' failed: Invalid keyring
gpg: Total number processed: 60
gpg:               imported: 60
gpg: no ultimately trusted keys found

****

我不确定出了什么问题。我在mac上,在建立映像时,我得到了这个错误。这是否意味着hadoop密钥是错误的和过时的?是因为debian:9 image?

yzxexxkh

yzxexxkh1#

当前密钥文件中似乎有一个格式不正确的密钥条目。确保两行之间有新行字符 -----BEGIN PGP PUBLIC KEY BLOCK----- 还有真正的钥匙。
对我来说,在当前的密钥文件中,第5520行之后缺少一个新行:

-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF9U5ZcBEADJS2a8ihhZtN1wXOJfyLZreuHL9HJxRvogQbhrhpFQrKAusdf2
...

应该是:

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBF9U5ZcBEADJS2a8ihhZtN1wXOJfyLZreuHL9HJxRvogQbhrhpFQrKAusdf2
...

相关问题