PowerShell - Ошибка Install-Package

Ответить
Аватара пользователя
Remap

PowerShell - Ошибка Install-Package

Сообщение Remap »

Добрый день!

При попытке установки некоторых (keepass, 7-zip) приложений из Chocolatey выскакивает ошибка.Текст ошибки:



Скрытый текст

[spoiler]Код:
[/spoiler]

Код: Выделить всё

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS C:\Windows\system32> Install-Package -Name 7zip -verbose -Force
VERBOSE: Using the provider 'msu' for searching packages.
VERBOSE: Using the provider 'Programs' for searching packages.
VERBOSE: Using the provider 'msi' for searching packages.
VERBOSE: Using the provider 'Chocolatey' for searching packages.
VERBOSE: Using the provider 'NuGet' for searching packages.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Total package yield:'0' for the specified package '7zip'.
VERBOSE: The -Repository parameter was not specified.  PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is
'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='7zip'' for ''.
VERBOSE: Total package yield:'0' for the specified package '7zip'.
VERBOSE: Performing the operation "Install Package" on target "Package '7zip' version '16.4.0.20170506' from
'chocolatey'.".
VERBOSE: NuGet: Attempting to resolve dependency 'chocolatey-core.extension (= 1.2)'.
VERBOSE: NuGet: Installing '7zip.install 16.4.0.20170506'.
VERBOSE: NuGet: Successfully installed '7zip.install 16.4.0.20170506'.
VERBOSE:
VERBOSE: Launching Process-EXE :'False C:\Chocolatey\lib\7zip.install.16.4.0.20170506\tools\7zip_x64.exe'
VERBOSE: Exception : DefaultDomain//Win32Exception/The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at Microsoft.PackageManagement.ChocolateyPrototype.Common.AsyncProcess.Start(ProcessStartInfo startInfo, IDictiona
 environment)
   at Microsoft.PackageManagement.ChocolateyPrototype.ChocolateyRequest.StartChocolateyProcessAsAdmin(String
statements, String exeToRun, Boolean minimized, Boolean noSleep, Int32[] validExitCodes, String workingDirectory)
Install-Package : The system cannot find the file specified
At line:1 char:1
+ Install-Package -Name 7zip -verbose -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (False C:\Chocol...ls\7zip_x64.exe:String) [Install-Package], Exception
    + FullyQualifiedErrorId : Process Execution Failed,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage







В чём может быть проблема?
Аватара пользователя
Kazun

Re: PowerShell - Ошибка Install-Package

Сообщение Kazun »

Попробовать choco install 7zip , т.к. в вывод попадает лишнее False - Launching Process-EXE :'False C:\Chocolatey\lib\7zip.install.16.4.0.20170506\tools\7zip_x64.exe' .
Аватара пользователя
Kazun

Re: PowerShell - Ошибка Install-Package

Сообщение Kazun »

Kazun, получаю такой вывод:



Скрытый текст

[spoiler]Windows PowerShell

Copyright (C) 2016 Microsoft Corporation. All rights reserved.



PS C:\Windows\system32> Install-Package -Name choco install 7zip -verbose -Force

Install-Package : A positional parameter cannot be found that accepts argument 'install'.

At line:1 char:1

+ Install-Package -Name choco install 7zip -verbose -Force

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidArgument: (Изображение [Install-Package], ParameterBindingException

+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackag

e



PS C:\Windows\system32> choco install 7zip

choco : The term 'choco' 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 that the path is correct and try again.

At line:1 char:1

+ choco install 7zip

+ ~~~~~

+ CategoryInfo : ObjectNotFound: (choco:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException[/spoiler]




Не смотрите,что у меня другой логин,просто под прежним не смог войти.
Ответить

Вернуться в «Скриптовые языки администрирования Windows»