5

Since the last time I reinstall windows, and then cygwin, apt-cyg stops working. It keeps telling me

"md5sum: standard input: no properly formatted MD5 checksum lines found".

What could cause the issue? And if I want to learn more about the error, where should I go and look?


Edit: When I start to debug the problem, I realized that the md5 code generated was too long(128 char) for an md5 code(normally 32 char). Since I am using a 64-bit version of cygwin, it could be the source of the issue. But how to resolve it?

3 Answers 3

10

Since version 2.867, cygwin has move to sha512 checksum, however, the current version of apt-cyg is still using md5sum rather than sha512sum for integrity verification. That's what causes the problem.

To resolve the issue change the md5sum in line 323 and 326 of the file "apt-cyg" with sha512sum. It should work.

This issue has already been addressed by pull request #37: https://github.com/transcode-open/apt-cyg/pull/38. But the change has not been implemented to the master branch yet.


Edit:

If you edit the file with windows program, the line breaker might be changed and causing issues such as

/usr/bin/apt-cyg: line 25: $'\r': command not found

Because bash recognized the line changer as a command. I suggest using linux editor like vim, emacs or gedit for the changing. Or you may directly use the apt-cyg file uploaded in pull request #37: https://github.com/jfritz/apt-cyg/blob/97848cfa9ae05297c0b01daeb8ad08a70bc3b77b/apt-cyg

2
  • The newer apt-cyg file has slightly different line numbers, but +1 for pointing me to roughly the right part of the file, and the appropriate fix. For me it was 343 and 346, and I also changed the comment too because OCD.
    – Davos
    May 21, 2015 at 5:47
  • 1
    Seems they fixed this in the newer version. Just reinstall apt-cyg
    – brrystrw
    Jun 9, 2015 at 12:50
0

The current version of apt-cyg is still using md5sum rather than sha512sum for integrity verification.

343:#digactual=`md5sum $file | awk '{print $1}'`
344:digactual=`sha512sum $file | awk '{print $1}'`

To resolve the issue change the md5sum in line 343 of the file "apt-cyg" with sha512sum. It worked for me.

3
  • Wasn't it taken down by DMCA's takedown notice already? The version you downloaded was probably quite old.
    – Chong
    Feb 26, 2016 at 17:47
  • 1
    this version was the only one I found. Initially I thought it is old but actually its bigger than the one presented in other answers if you take in consideration line numbers.
    – aprodan
    Mar 9, 2016 at 0:24
  • OK, good to know it still exists... Somehow the lack of package manager about Cygwin really doesn't sit well with me...
    – Chong
    Mar 9, 2016 at 0:48
0

Execute this from your shell:

perl -i.bak -pe 's{md5sum}{sha512sum}g'  /usr/local/bin/apt-cyg

Then retry.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .