Akshat Tamrakar
Akshat Tamrakar

Reputation: 2339

Unable to install dart-sdk?

I want to get stated with flutter-web so I am trying to install dart-sdk.

I tried to install it by ...

... but it just doesn't install.

Instead, a script gives an error about the SHA256 checksum for a zip file not matching the expected value.

C:\WINDOWS\system32>choco install dart-sdk
Chocolatey v0.10.13
Installing the following packages:
dart-sdk
By installing you accept licenses for the packages.
Progress: Downloading dart-sdk 2.3.0... 100%

dart-sdk v2.3.0 [Approved]
dart-sdk package files install completed. Performing other installation steps.
The package dart-sdk wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[N]o/[P]rint): y

Get-BinRoot is going to be deprecated in v1 and removed in v2. It has been replaced with Get-ToolsLocation (starting with v0.9.10), however many packages no longer require a special separate directory since package folders no longer have versions on them. Some do though and should continue to use Get-ToolsLocation.
PATH environment variable does not have C:\tools\dart-sdk\bin in it. Adding...
Downloading dart-sdk 64 bit
  from 'https://storage.googleapis.com/dart-archive/channels/stable/release/2.3.0/sdk/dartsdk-windows-x64-release.zip'
Progress: 100% - Completed download of C:\Users\HP\AppData\Local\Temp\dart-sdk\2.3.0\dartsdk-windows-x64-release.zip (0 B).
Download of dartsdk-windows-x64-release.zip (0 B) completed.
Error - hashes do not match. Actual value was 'E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855'.
ERROR: Checksum for 'C:\Users\HP\AppData\Local\Temp\dart-sdk\2.3.0\dartsdk-windows-x64-release.zip' did not meet '0b095fe80ea50b17f70c154980ce0cdfa0c2709b9eae739b39c00b42185a6ccf' for checksum type 'sha256'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of dart-sdk was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\dart-sdk\chocolateyInstall.ps1'.
 See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - dart-sdk (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\dart-sdk\chocolateyInstall.ps1'.
 See log for details.

Upvotes: 1

Views: 9447

Answers (1)

Eltaj
Eltaj

Reputation: 1

Run cmd as administrator and use this command choco install dart-sdk

Upvotes: 0

Related Questions