Bazel: apt-get update : W: Failed to fetch http://storage.googleapis.com/bazel-apt/dists/stable/InRelease Unable to find expected entry 'jdk1.8/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

Created on 12 Jul 2016  ·  7Comments  ·  Source: bazelbuild/bazel

After following the instructions for installing the apt repo :

  1. Add Bazel distribution URI as a package source (one time setup)

$ echo "deb http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
$ curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add -

  1. Update and install Bazel

$ sudo apt-get update && sudo apt-get install bazel

the update fails with :

W: Failed to fetch http://storage.googleapis.com/bazel-apt/dists/stable/InRelease Unable to find expected entry 'jdk1.8/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

apt-get install bazel still seems to work, but this does break apt-get update (returns non-zero)

P2 other documentation (cleanup)

Most helpful comment

https://docs.bazel.build/versions/master/install-ubuntu.html#install-on-ubuntu should be updated to use:

echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list (HTTPS)

instead of:

echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list (HTTP).

That fixes the authentication error from sudo apt update and bazel can get installed.

All 7 comments

Just ran into the same problem, it looks like there's no 32 bit release. The workaround is to change the first command to:

echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list

I still get this kind of error will after

curl -k https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list

the error turn to be 407 authentication required
W: Failed to fetch http://storage.googleapis.com/bazel-apt/dists/stable/jdk1.8/binary-amd64/Packages 407 authenticationrequired

https://docs.bazel.build/versions/master/install-ubuntu.html#install-on-ubuntu should be updated to use:

echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list (HTTPS)

instead of:

echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list (HTTP).

That fixes the authentication error from sudo apt update and bazel can get installed.

Debian Stretch failing #5274

Same with https

Err:10 https://storage.googleapis.com/bazel-apt stable InRelease                                    
  The following signatures were invalid: EXPKEYSIG 3D5919B448457EE0 Bazel Developer (Bazel APT repository key) <[email protected]>

@mryellow same error happens to me and not solved yet
@efernandez Thanks for reaching out !do you got any other update information for the old doc for this?

Get:5 https://storage.googleapis.com/bazel-apt stable InRelease [2,450 B]
Err:5 https://storage.googleapis.com/bazel-apt stable InRelease
  The following signatures were invalid: KEYEXPIRED 1527185977  KEYEXPIRED 1527185977  KEYEXPIRED 1527185977
Fetched 2,450 B in 1s (1,514 B/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://storage.googleapis.com/bazel-apt stable InRelease: The following signatures were invalid: KEYEXPIRED 1527185977  KEYEXPIRED 1527185977  KEYEXPIRED 1527185977
W: Failed to fetch https://storage.googleapis.com/bazel-apt/dists/stable/InRelease  The following signatures were invalid: KEYEXPIRED 1527185977  KEYEXPIRED 1527185977  KEYEXPIRED 1527185977
W: Some index files failed to download. They have been ignored, or old ones used instead.

after update the key with curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add I got

Err:5 https://storage.googleapis.com/bazel-apt stable InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists... Done
E: Failed to fetch https://storage.googleapis.com/bazel-apt/dists/stable/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Some index files failed to download. They have been ignored, or old ones used instead.

https://github.com/bazelbuild/bazel/issues/5274#issuecomment-392233190

Are you missing a - at the end?

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

@mryellow thanks for reaching out , I really missed a -

Was this page helpful?
0 / 5 - 0 ratings