Closed PeterDeKeer closed 10 years ago
@ferventcoder just wanted to cc you here in case there was something obvious about this error, thanks for any insight you may be able to add.
Always return -debug output, otherwise it's hard to see what went wrong.
@ferventcoder thanks, is there any example somewhere that does that?
C:\WINDOWS\system32>cinst Atom -debug
DEBUG: Running 'Append-InstallLog' with chocoInstallLog:''
DEBUG: Arguments: $command =
'install'|$packageNames='Atom'|$source=''|$version=''|$allVersions=False|$InstallArguments=''|$overrideArguments=False|$force=False|$prerelease=False|$localonly=False|$v
erbosity=False|$debug=True|$quiet=False|$name=''|$ignoreDependencies=False|$forceX86=False|$packageParameters=''|PowerShellVersion=4.0
DEBUG: Running 'Chocolatey-Install' for 'Atom' with source: '', version: '', installerArguments:''
DEBUG: Running 'Chocolatey-NuGet' for Atom with source:''. Force? False
Chocolatey (v0.9.8.25) is installing 'Atom' and dependencies. By installing you accept the license for 'Atom' and each dependency you are installing.
DEBUG: Installing packages to "C:\ProgramData\chocolatey\lib".
DEBUG: Running 'Run-NuGet' for Atom with source: '', version:''
DEBUG: ___ NuGet ____
DEBUG: Running 'Get-ConfigValue' with configValue:'useNuGetForSources'
DEBUG: Running 'Get-UserConfigValue' with configValue:'useNuGetForSources'
DEBUG: After checking the user config the value of 'useNuGetForSources' is ''
DEBUG: Value not found in the user config file - checking the global config
DEBUG: Running 'Get-GlobalConfigValue' with configValue:'useNuGetForSources'
DEBUG: After checking the global config the value of 'useNuGetForSources' is 'false'
DEBUG: Running 'Get-UserConfigValue' with configValue:'sources'
DEBUG: Running 'Get-GlobalConfigValue' with configValue:'sources'
DEBUG: Using global sources
DEBUG: Using '-Source "https://chocolatey.org/api/v2/;"' as the source arguments
DEBUG: Calling 'C:\ProgramData\chocolatey\chocolateyinstall\nuget.exe' install Atom -OutputDirectory "C:\ProgramData\chocolatey\lib" -Source
"https://chocolatey.org/api/v2/;" -NonInteractive -NoCache
DEBUG: Installing 'Atom 0.113.0'.
Successfully installed 'Atom 0.113.0'.
DEBUG: Evaluating NuGet output for line: Installing 'Atom 0.113.0'.
DEBUG: Evaluating NuGet output for line: Successfully installed 'Atom 0.113.0'.
DEBUG: NuGet installed Atom. If we are ignoring dependencies (False) then we will clean this up.
Atom v0.113.0
DEBUG: Running 'Delete-ExistingErrorLog' for Atom
DEBUG: Looking for failure log at 'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\failure.log'
DEBUG: Found the failure log. Deleting it...
DEBUG: Running 'Run-ChocolateyPS1' for Atom with packageFolder:'C:\ProgramData\chocolatey\lib\Atom.0.113.0', action: 'install'
DEBUG: __ PowerShell install (chocolateyinstall.ps1) __
DEBUG: Looking for chocolateyinstall.ps1 in folder 'C:\ProgramData\chocolatey\lib\Atom.0.113.0'. If chocolateyinstall.ps1 is found, it will be run.
DEBUG: Action file is 'chocolateyInstall.ps1'
DEBUG: Running 'C:\ProgramData\chocolatey\lib\Atom.0.113.0\tools\chocolateyInstall.ps1'
DEBUG: Running 'Install-ChocolateyZipPackage' for Atom with url:'https://github.com/atom/atom/releases/download/v0.113.0/atom-windows.zip', unzipLocation:
'C:\ProgramData\chocolatey\lib\Atom.0.113.0\tools', url64bit: 'https://github.com/atom/atom/releases/download/v0.113.0/atom-windows.zip', specificFolder: '', checksum:
'', checksumType: '', checksum64: '', checksumType64: ''
DEBUG: Running 'Get-ChocolateyWebFile' for Atom with url:'https://github.com/atom/atom/releases/download/v0.113.0/atom-windows.zip',
fileFullPath:'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip', url64bit:'https://github.com/atom/atom/releases/download/v0.113.0/atom-windows.zip',
checksum: '', checksumType: '', checksum64: '', checksumType64: ''
DEBUG: Running 'Get-ProcessorBits'
DEBUG: CPU is 64 bit
DEBUG: Setting url to 'https://github.com/atom/atom/releases/download/v0.113.0/atom-windows.zip' and bitPackage to 64
DEBUG: Running 'Get-WebHeaders' with url:'https://github.com/atom/atom/releases/download/v0.113.0/atom-windows.zip', userAgent: 'chocolatey command line'
DEBUG: Setting the UserAgent to 'chocolatey command line'
DEBUG: Web Headers Received:
DEBUG: 'x-amz-id-2':'kJEwsg/xy529PYgL6yj3BUWHNdrLg7k+PhP6DrArBQ9oKiJl9YtsEZR0Oe8euDKe'
DEBUG: 'x-amz-request-id':'955BC02B52BEA316'
DEBUG: 'x-amz-meta-surrogate-control':'max-age=31557600'
DEBUG: 'x-amz-meta-surrogate-key':'repository-3228505 user-3697332'
DEBUG: 'Content-Disposition':'attachment; filename=atom-windows.zip'
DEBUG: 'Accept-Ranges':'bytes'
DEBUG: 'Content-Length':'69208497'
DEBUG: 'Cache-Control':'max-age=31557600'
DEBUG: 'Content-Type':'application/octet-stream'
DEBUG: 'Date':'Wed, 09 Jul 2014 17:55:10 GMT'
DEBUG: 'ETag':'"228a370204a847ab39bcabe7eed2c0e7"'
DEBUG: 'Last-Modified':'Tue, 08 Jul 2014 22:34:50 GMT'
DEBUG: 'Server':'AmazonS3'
DEBUG: Atom's requested file has already been downloaded. Using cached copy at
'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'.
DEBUG: Checking that 'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip' is the size we expect it to be.
DEBUG: Verifying package provided checksum of '' for 'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'.
DEBUG: Running 'Get-CheckSumValid' with file:'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip', checksum: '', checksumType: ''
DEBUG: Verifying downloaded file is not known to contain viruses. FilePath: 'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'.
DEBUG: Running 'Get-VirusCheckValid' with location:'https://github.com/atom/atom/releases/download/v0.113.0/atom-windows.zip', file:
'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'
DEBUG: Running 'Get-ChocolateyUnzip' with fileFullPath:'C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip'', destination:
'C:\ProgramData\chocolatey\lib\Atom.0.113.0\tools', specificFolder: '`, packageName: 'Atom'
Extracting C:\Users\Peter\AppData\Local\Temp\chocolatey\Atom\AtomInstall.zip to C:\ProgramData\chocolatey\lib\Atom.0.113.0\tools...
DEBUG: wrapping 7za invocation with Write-FileUpdateLog
DEBUG: Running 'Write-FileUpdateLog' with logFilePath:'C:\ProgramData\chocolatey\lib\Atom.0.113.0\AtomInstall.zip.txt'',
locationToMonitor:C:\ProgramData\chocolatey\lib\Atom.0.113.0\tools, Operation: '
param($7zip, $destination, $fileFullPath, [ref]$exitCodeRef)
$p = Start-Process $7zip -ArgumentList "x -o`"$destination`" -y `"$fileFullPath`"" -Wait -WindowStyle Hidden -PassThru
$exitCodeRef.Value = $p.ExitCode
'
DEBUG: Tracking current state of 'C:\ProgramData\chocolatey\lib\Atom.0.113.0\tools'
Write-Error : Atom did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] This command cannot be run due to the error: The system cannot find the file specified.
-----------------------
At C:\ProgramData\chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:30 char:3
+ Write-Error $errorMessage
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error
DEBUG: Running 'Move-BadInstall' for Atom version: '0.113.0', packageFolder:'C:\ProgramData\chocolatey\lib\Atom.0.113.0'
DEBUG: Moving bad package 'Atom v0.113.0' to 'C:\ProgramData\chocolatey\lib-bad'.
Write-Error : Package 'Atom v0.113.0' did not install successfully: This command cannot be run due to the error: The system cannot find the file specified.
At C:\ProgramData\chocolatey\chocolateyinstall\functions\Chocolatey-NuGet.ps1:90 char:17
+ Write-Error "Package `'$installedPackageName v$installedPackageV ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error
The term 'true' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify t
hat the path is correct and try again.
Command 'install' failed (sometimes this indicates a partial failure). Additional info/packages: Atom
DEBUG: Exiting with non-zero exit code.
Closed my Admin cmd window, opened another Admin cmd window and...
cinst Atom SUCCES!!!
So installing chocolatey AND Atom in one move is not working.
Do you want me to test something more?
Nope, thanks, I'm going to update the instructions.
Thanks for the time! And great package!
@ferventcoder Thanks again for the -debug
tip :+1:
Depending on how you elevate and execute the chocolatey install and then install atom, I'm thinking your path variable might not be updated. If I remember correctly chocolatey handles this when you install but perhaps its a bug. I'll see if I can reproduce and debug either way so other users don't have this problem.
Oh actually in the first comment I see you ran chocolatey install as admin. I think that might actually be the culprit. You should install chocolatey as a normal user.
It's supposed to work okay. But here's something you can do after installing chocolatey:
from cmd.exe:
RefreshEnv
No powershell equivalent.
@bradgearon If you install as an admin, you get the machine level system path now. It's more beneficial to install chocolatey as an admin.
@ferventcoder oh OK so do install as admin thank you.
Get-ChocolateyUnzip... that is the culprit... It was fixed, now it's broken again :( - I think we just need a call in there to ensure that we can get to 7za
@ferventcoder you rock! :+1:
I am trying to update a software and I cant. I generated the debug output. I want to use the GUI.
PS C:\WINDOWS\system32> choco upgrade chocolatey -debug >clip: out-file : Cannot find drive. A drive with the name 'clip' does not exist. At line:1 char:1
+ CategoryInfo : ObjectNotFound: (clip:String) [Out-File], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.OutFileCommand
PS C:\WINDOWS\system32> PS C:\WINDOWS\system32> choco upgrade chocolatey -debug Chocolatey v0.10.11 Chocolatey is running on Windows v 10.0.17134.0 Command line: "C:\ProgramData\chocolatey\choco.exe" upgrade chocolatey -debug Received arguments: upgrade chocolatey -debug The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type
NOTE: Hiding sensitive configuration data! Please double and triple check to be sure no sensitive data is shown, especially if copying output to a gist for review. Configuration: CommandName='upgrade'|CacheLocation='C:\Temp\chocolatey'| ContainsLegacyPackageInstalls='True'| CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'| Sources='https://chocolatey.org/api/v2/'|SourceType='normal'| Debug='True'|Verbose='False'|Trace='False'|Force='False'|Noop='False'| HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'| QuietOutput='False'|PromptForConfirmation='True'|AcceptLicense='False'| AllowUnofficialBuild='False'|Input='chocolatey'|AllVersions='False'| SkipPackageInstallProvider='False'|PackageNames='chocolatey'| Prerelease='False'|ForceX86='False'|OverrideArguments='False'| NotSilent='False'|ApplyPackageParametersToDependencies='False'| ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'| AllowMultipleVersions='False'|AllowDowngrade='False'| ForceDependencies='False'|Information.PlatformType='Windows'| Information.PlatformVersion='10.0.17134.0'| Information.PlatformName='Windows 10'| Information.ChocolateyVersion='0.10.11.0'| Information.ChocolateyProductVersion='0.10.11'| Information.FullName='choco, Version=0.10.11.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64BitOperatingSystem='True'| Information.Is64BitProcess='True'|Information.IsInteractive='True'| Information.UserName='apome'|Information.UserDomainName='APOMETRON'| Information.IsUserAdministrator='True'| Information.IsUserSystemAccount='False'| Information.IsUserRemoteDesktop='False'| Information.IsUserRemote='True'| Information.IsProcessElevated='True'| Information.IsLicensedVersion='False'|Information.LicenseType='Foss'| Features.AutoUninstaller='True'|Features.ChecksumFiles='True'| Features.AllowEmptyChecksums='False'| Features.AllowEmptyChecksumsSecure='True'| Features.FailOnAutoUninstaller='False'| Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'| Features.LogEnvironmentValues='True'|Features.LogWithoutColor='False'| Features.VirusCheck='True'| Features.FailOnInvalidOrMissingLicense='False'| Features.IgnoreInvalidOptionsSwitches='True'| Features.UsePackageExitCodes='True'| Features.UseFipsCompliantChecksums='False'| Features.ShowNonElevatedWarnings='True'| Features.ShowDownloadProgress='True'| Features.StopOnFirstPackageFailure='False'| Features.UseRememberedArgumentsForUpgrades='False'| Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'| Features.RemovePackageInformationOnUninstall='False'| Features.ScriptsCheckLastExitCode='False'| ListCommand.LocalOnly='False'| ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'| ListCommand.PageSize='25'|ListCommand.Exact='False'| ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'| ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'| ListCommand.ApprovedOnly='False'| ListCommand.DownloadCacheAvailable='False'| ListCommand.NotBroken='False'| ListCommand.IncludeVersionOverrides='False'| UpgradeCommand.FailOnUnfound='False'| UpgradeCommand.FailOnNotInstalled='False'| UpgradeCommand.NotifyOnlyAvailableUpgrades='False'| UpgradeCommand.ExcludePrerelease='False'| NewCommand.AutomaticPackage='False'| NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'| SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'| SourceCommand.AllowSelfService='False'| SourceCommand.VisibleToAdminsOnly='False'| FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'| PinCommand.Command='unknown'|OutdatedCommand.IgnorePinned='False'| Proxy.BypassOnLocal='True'| Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode Upgrading the following packages: chocolatey By upgrading you accept licenses for the packages. Current environment values (may contain sensitive data):
Chocolatey upgraded 0/1 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Exiting with 0
PS C:\WINDOWS\system32>
Windows 8. Downloaded Chocolatey as admin, in same screen I try to "cinst Atom" (cmd ver Microsoft Windows [Version 6.3.9600])