3
respostas

Não consigo instalar o Chocolatey

Não consigo instalar o Chocolatey no cmd e nem no PowerShell. E aparece essa mensagem. O que faço?

Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.10.
Exceção ao chamar "DownloadFile" com "2" argumento(s): "Exceção durante uma solicitação do WebClient."
No linha:165 caractere:3
+   $downloader.DownloadFile($url, $file)
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Extracting C:\Users\delle\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\delle\AppData\Local\Temp\chocolatey\chocInstall...

ERROR: O sistema não pode encontrar o arquivo especificado.
C:\Users\delle\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip



System ERROR:
O sistema não pode encontrar o arquivo especificado.
Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompression = 'true' and call install
again. Error: 7-Zip encountered a fatal error while extracting the files
No linha:221 caractere:9
+     2 { throw "$errorMessage 7-Zip encountered a fatal error while ex ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Unable to unzip...cting the files:String) [], RuntimeException
    + FullyQualifiedErrorId : Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompres
   sion = 'true' and call install again. Error: 7-Zip encountered a fatal error while extracting the files
3 respostas

Oi Delleon, tudo bem? Me parece que o download do chocolatey não ocorreu muito bem. Você tentou refazer o processo?

Tentei refazer sim, olha o que aparece no cmd...

Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.11.
Extracting C:\Users\delle\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\delle\AppData\Local\Temp\chocolatey\chocInstall...
Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
  before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when
  upgrading from a version of Chocolatey less than 0.9.9.
  'Batch file could not be found' is also safe to ignore.
  'The system cannot find the file specified' - also safe.
AVISO: Not setting tab completion: Profile file does not exist at
'C:\Users\delle\OneDrive\Documentos\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

C:\WINDOWS\system32>v2/pack

Me parece que agora foi, olha a mensagem diz "Chocolatey (choco.exe) is now ready." então você já pode usar o comando choco. Já tentou isso?

Tipo: choco version ?