sha256sum: 'standard input': no properly formatted checksum lines found
Asked Answered
S

3

5

I'm trying to verify an installer by typing this command.

grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c -

But I get a response like this from Terminal

sha256sum: 'standard input': no properly formatted checksum lines found

Obviously, I already have SHASUMS256.txt file and on the right path on Terminal(MacOS).

Also prior to this, I've already installed CoreUtils from brew by running this command.

brew install coreutils

So what does 'standard input': no properly formatted checksum lines found mean in this context on MacOS Terminal?

Sedgemoor answered 28/12, 2021 at 4:16 Comment(0)
T
5

In my macOS Monterey Version 12.61 I have to add an asterisk prior to the filename, in this way:

36a2c2c01723151b36987e377ebfc152337cc61699eaa6bf45d9460a4c3e216b *nifi-toolkit-1.17.0-bin.zip

And then run the command:

shasum -a 256 -c input.txt

Finally, I got this:

nifi-toolkit-1.17.0-bin.zip: OK
Ticker answered 14/11, 2022 at 16:43 Comment(1)
Or replace that * with a space, so there can only be ` ` or ` *` between hash and file path.Directory
S
2

It would help if you posted the contents of the file:

  • SHASUMS256.txt

If it is properly formatted it should contain a line that looks something like:

09ac98ea433e8cb19d09ead1a0bd439cafb1c3e4cb699af04b4e4da1f6ca3f02 node-vx.y.z.tar.gz

You could get your stderr output for 2 possible reasons.

  1. The line in SHASUMS256.txt is not formatted correctly. It should be formatted as <ChecksumHash> <Filename> without the <>s.
  2. The output from your grep search is blank (no output because grep returned no matches). This is more likely and I would suggest running the grep command by itself first to see what the output is prior to piping it into sha256sum.
Sitzmark answered 5/2, 2022 at 21:48 Comment(0)
T
1

Make sure the checksum and the filename are separated by two spaces.

Tussle answered 7/10 at 16:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.