ScoopInstaller / Versions

📦 A Scoop bucket for alternative versions of apps.
https://scoop.sh
The Unlicense
208 stars 199 forks source link

[Bug]: Hash check failed for vim-tux #773

Closed pablogipi closed 9 months ago

pablogipi commented 1 year ago

Prerequisites

Package Name

vim-tux

Expected/Current Behaviour

I can't install vim-tux becasue is returning a Hash check error: `Installing 'vim-tux' (9.0.0846) [64bit] from versions bucket complete-x64.7z (9.4 MB) [====================================================================================================================================================================================================================================================] 100% Checking hash of complete-x64.7z ... ERROR Hash check failed! App: versions/vim-tux URL: https://tuxproject.de/projects/vim/complete-x64.7z First bytes: 37 7A BC AF 27 1C 00 04 Expected: cedc131fc1cacc5a8f38326d28d4cc7dbade0fdc50a250bca163e1f4293bb75c Actual: 235bd05a5cd1906aa3f85f5d04bea2466768054fb6eddf971c5c497e605c4d00

Please try again or create a new issue by using the following link and paste your console output: https://github.com/ScoopInstaller/Versions/issues/new?title=vim-tux%409.0.0846%3a+hash+check+failed`

Steps to Reproduce

❯ sudo scoop install vim-tux -g
WARN  Purging previous failed installation of vim-tux.
ERROR 'vim-tux --global' isn't installed.
WARN  Purging previous failed installation of vim-tux.
ERROR 'vim-tux --global' isn't installed.
Installing 'vim-tux' (9.0.0846) [64bit] from versions bucket
complete-x64.7z (9.4 MB) [====================================================================================================================================================================================================================================================] 100%
Checking hash of complete-x64.7z ... ERROR Hash check failed!
App:         versions/vim-tux
URL:         https://tuxproject.de/projects/vim/complete-x64.7z
First bytes: 37 7A BC AF 27 1C 00 04
Expected:    cedc131fc1cacc5a8f38326d28d4cc7dbade0fdc50a250bca163e1f4293bb75c
Actual:      235bd05a5cd1906aa3f85f5d04bea2466768054fb6eddf971c5c497e605c4d00

Please try again or create a new issue by using the following link and paste your console output:
https://github.com/ScoopInstaller/Versions/issues/new?title=vim-tux%409.0.0846%3a+hash+check+failed

Possible Solution

Update Hash?

Scoop and Buckets Version

❯ scoop --version
Current Scoop version:
v0.3.0 - Released at 2022-10-10

'extras' bucket:
2736f0ddf (HEAD -> master, origin/master, origin/HEAD) waterfox: Update to version 5.1

'main' bucket:
fatal: detected dubious ownership in repository at 'C:/Users/pablo/scoop/buckets/main'
'C:/Users/pablo/scoop/buckets/main' is owned by:
        'S-1-5-32-544'
but the current user is:
        'S-1-5-21-1049663091-1834104122-93563234-1001'
To add an exception for this directory, call:

        git config --global --add safe.directory C:/Users/pablo/scoop/buckets/main

'nerd-fonts' bucket:
fatal: detected dubious ownership in repository at 'C:/Users/pablo/scoop/buckets/nerd-fonts'
'C:/Users/pablo/scoop/buckets/nerd-fonts' is owned by:
        'S-1-5-32-544'
but the current user is:
        'S-1-5-21-1049663091-1834104122-93563234-1001'
To add an exception for this directory, call:

        git config --global --add safe.directory C:/Users/pablo/scoop/buckets/nerd-fonts

'versions' bucket:
fatal: detected dubious ownership in repository at 'C:/Users/pablo/scoop/buckets/versions'
'C:/Users/pablo/scoop/buckets/versions' is owned by:
        'S-1-5-32-544'
but the current user is:
        'S-1-5-21-1049663091-1834104122-93563234-1001'
To add an exception for this directory, call:

        git config --global --add safe.directory C:/Users/pablo/scoop/buckets/versions

Scoop Config

❯ scoop config

last_update                       scoop_branch scoop_repo
-----------                       ------------ ----------
2022-11-14T19:30:28.9056565+01:00 master       https://github.com/ScoopInstaller/Scoop

PowerShell Version

Not using Powershell, just CMD with clink
❯ clink info
version          : 1.3.46.d6fdd0

Additional Softwares

No response

FlawlessCasual17 commented 1 year ago

@pablogipi It worked for me just fine: (WindowsTerminal)c3g2n3_11-14-2022

Have you tried doing:

scoop bucket rm versions

After that, then execute:

scoop bucket add versions
pablogipi commented 1 year ago

Thanks @Zliced13 bucket rm and bucket add fixed the problem. Out of curiosity, why did removing and adding the versions bucket fix the problem? Cheers

rasa commented 1 year ago

@pablogipi Sometimes the buckets get corrupted. In your case, it looks like the file ownership changed. Recreating the bucket almost always fixes the issue.

enndubyu commented 1 year ago

Please note, version 9.0.0880 is now failing hashcheck again, and removing and re-adding the bucket does not solve the problem

Installing 'vim-tux' (9.0.0880) [64bit] from versions bucket complete-x64.7z (9.4 MB) [====================================================================================] 100% Checking hash of complete-x64.7z ... ERROR Hash check failed! App: versions/vim-tux URL: https://tuxproject.de/projects/vim/complete-x64.7z First bytes: 37 7A BC AF 27 1C 00 04 Expected: 235bd05a5cd1906aa3f85f5d04bea2466768054fb6eddf971c5c497e605c4d00 Actual: f4b7d0ff010d3562f4fda6e144819a24dcdf44e593981867f4a2270e7fe5e495

pablogipi commented 1 year ago

@pablogipi Sometimes the buckets get corrupted. In your case, it looks like the file ownership changed. Recreating the bucket almost always fixes the issue.

Thanks for the explanation.