【问题标题】:Cannot install bazel on Ubuntu 20.04 - invalid EXPKEYSIG无法在 Ubuntu 20.04 上安装 bazel - EXPKEYSIG 无效
【发布时间】:2020-09-10 21:59:18
【问题描述】:

我按照https://docs.bazel.build/versions/master/install-ubuntu.html#install-with-installer-ubuntu上的说明进行操作

并尝试在 Ubuntu 上安装 bazel。

当我运行第 2 步时: sudo apt update && sudo apt install bazel

我明白了:

Get:1 https://storage.googleapis.com/bazel-apt stable InRelease [2,256 B]
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                         
Hit:3 http://us.archive.ubuntu.com/ubuntu focal InRelease                            
Hit:4 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                    
Err:1 https://storage.googleapis.com/bazel-apt stable InRelease
  The following signatures were invalid: EXPKEYSIG 3D5919B448457EE0 Bazel Developer (Bazel APT repository key) <bazel-dev@googlegroups.com>
Hit:5 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease                  
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease                     
Reading package lists... Done
W: GPG error: https://storage.googleapis.com/bazel-apt stable InRelease: The following signatures were invalid: EXPKEYSIG 3D5919B448457EE0 Bazel Developer (Bazel APT repository key) <bazel-dev@googlegroups.com>
E: The repository 'https://storage.googleapis.com/bazel-apt stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

有人知道如何解决这个问题吗?

【问题讨论】:

标签: ubuntu bazel ubuntu-20.04


【解决方案1】:

Bazel Ubuntu PPA 密钥已过期。

来自https://github.com/bazelbuild/bazel/issues/11470#issuecomment-633205152

您可能必须使用新密钥手动更新您的 apt 密钥环:

$ curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
$ sudo apt-get update

【讨论】:

    【解决方案2】:

    尝试使用 Bazelisk 安装 Bazel,如下所示:

    1. cd ~
    2. wget https://github.com/bazelbuild/bazelisk/releases/download/v1.6.1/bazelisk-linux-amd64
    3. chmod +x bazelisk-linux-amd64
    4. sudo ln -s ~/bazelisk-linux-amd64 /usr/bin/bazel
    5. 试运行:bazel version

    【讨论】:

      猜你喜欢
      • 2020-10-03
      • 2021-05-24
      • 2021-11-28
      • 2022-08-17
      • 2020-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-18
      相关资源
      最近更新 更多