Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install-Package failed chocolatey provider #201

Closed
pulporange opened this issue Aug 13, 2016 · 7 comments
Closed

Install-Package failed chocolatey provider #201

pulporange opened this issue Aug 13, 2016 · 7 comments

Comments

@pulporange
Copy link

pulporange commented Aug 13, 2016

Hi there i've tried to install ie. vlc and keepass package through Install-Package Multiple times [chocolatey provider]

  • Windows 10 - Build 14393.51

  • P$ Execution Policy RemoteSigned

  • it builds flawlessly using the install wrapper provided by chocolatey "choco install"

  • i've checked my hdd looking for filesystem corruption/bad sectors => nothing

  • i've found that the apps based on ".exe" where not downloaded correctly / complete

  • other packages ie: git, 7zip, notepad++,ccleaner where installed flawlessly with Install-Package

    `PS C:\WINDOWS\system32> Find-package vlc -ProviderName chocolatey | Install-Package -Verbose
    VERBOSE: Performing the operation "Install Package" on target "Package 'vlc' version '2.2.4' from 'chocolatey'.".
    VERBOSE: NuGet: Installing 'vlc 2.2.4'.
    VERBOSE: NuGet: Successfully installed 'vlc 2.2.4'.
    VERBOSE: CreateFolder Success C:\Users\Ben-Probook\AppData\Local\Temp\chocolatey\vlc
    VERBOSE: GetChocolateyWebFile vlc => https://get.videolan.org/vlc/2.2.4/win64/vlc-2.2.4-win64.exe
    VERBOSE: Launching Process-EXE :'C:\Users\Ben-Probook\AppData\Local\Temp\chocolatey\vlc\vlcinstall.exe'
    VERBOSE: Exception : DefaultDomain//Win32Exception/The file or directory is corrupted and unreadable
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Microsoft.PackageManagement.ChocolateyPrototype.Common.AsyncProcess.Start(ProcessStartInfo startInfo, IDictionary environment)
    at Microsoft.PackageManagement.ChocolateyPrototype.ChocolateyRequest.StartChocolateyProcessAsAdmin(String statements, String exeToRun, Boolean minimized, Boolean noSleep, Int32[]
    validExitCodes, String workingDirectory)
    Install-Package : The file or directory is corrupted and unreadable
    At line:1 char:45

  • Find-package vlc -ProviderName chocolatey | Install-Package -Verbose

  •                                         ~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (C:\Users\Ben-Pr...\vlcinstall.exe:String) [Install-Package], Exception
    • FullyQualifiedErrorId : Process Execution Failed,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

PS C:\WINDOWS\system32>`

@pulporange pulporange changed the title Install-Package vlc Install-Package failed chocolatey provider Aug 14, 2016
@pulporange pulporange reopened this Aug 14, 2016
@jianyunt
Copy link
Contributor

@pulporange, the Chocolatey provider under OneGet project is only a prototype as a proof of concept and Microsoft internal team does not maintain it. In this case, Rob Reynolds is developing the chocolatey provider: https://github.com/chocolatey/chocolatey-oneget.
Issue is tracked chocolatey-community/chocolatey-oneget#5

@pulporange
Copy link
Author

Hi @jianyunt i've build the c# project with VStudio => it creates a bunch of dll, future chocolatey provider for PackageManagement, correct me if i'm wrong
i've installed them using the p$ script provided on the github repo install-provider.ps1

Here is a result

PS C:\> Get-PackageProvider -ListAvailable

Choco                    1.0.0.0
chocolatey               1.0.0.0
msi                      3.0.0.0          AdditionalArguments
msu                      3.0.0.0
NuGet                    2.8.5.206        Destination, ExcludeVersion, Scope, Headers, FilterOnTag, Contains, AllowP...
PowerShellGet            1.0.0.1          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, ...
Programs                 3.0.0.0          IncludeWindowsInstaller, IncludeSystemComponent

Maybe i'm missing something but the the Register-PackageSource is not ok

PS C:\> Register-PackageSource -Name "chocolatey" -Location "http://chocolatey.org/api/v2/" -ProviderName "Choco" -Verbose
VERBOSE: Performing the operation "Register Package Source." on target "Package Source 'chocolatey'
(http://chocolatey.org/api/v2/) in provider 'Choco'.".

PS C:\> Get-PackageSource

nuget.org                        NuGet            False      https://api.nuget.org/v3/index.json
PSGallery                        PowerShellGet    True       https://www.powershellgallery.com/api/v2/

@jianyunt
Copy link
Contributor

It looks like Choco has not implemented OneGet/AddPackageSource() which supports Register-PackageSource cmdlet. @ferventcoder, any plan to support it?

@ferventcoder
Copy link

The source at that location is still behind and with where Garrett had left it at that point. We should support whatever is needed to make it work correctly.

@jianyunt
Copy link
Contributor

@pulporange, can you try the ChocolateyGet provider instead to see if it satisfies your scenario.

@pulporange
Copy link
Author

Hi @jianyunt Sorry for the late response, i'll give it a try this week-end
Thanks for the update on this

@pulporange
Copy link
Author

I've tested it from provider install to app uninstall, it works like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants