chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.36k stars 902 forks source link

When I try to download old version like php 5 #3561

Closed musoftware closed 2 days ago

musoftware commented 2 days ago

Checklist

What You Are Seeing?

Get-BinRoot : The term 'Get-BinRoot' 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 C:\ProgramData\chocolatey\lib-bad\php\5.6.7\tools\chocolateyInstall.ps1:36 char:29

Join-Path : Cannot bind argument to parameter 'Path' because it is null. At C:\ProgramData\chocolatey\lib-bad\php\5.6.7\tools\chocolateyInstall.ps1:36 char:27

Install-ChocolateyZipPackage : The term 'Install-ChocolateyZipPackage' 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 C:\ProgramData\chocolatey\lib-bad\php\5.6.7\tools\chocolateyInstall.ps1:37 char:1

What is Expected?

When I try to download old version like php 5, the install powershell script created with get-root not new difination and that make problem

and temp solution I need to edit file before write All

How Did You Get This To Happen?

choco install php --version=5.6.7

System Details

Installed Packages

Chocolatey v2.4.0
chocolatey 2.4.0
php 5.6.7
2 packages installed.

Output Log

Chocolatey v2.4.0
Chocolatey is running on Windows v 10.0.22631.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" list --debug --verbose
Received arguments: list --debug --verbose
RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
Sending message 'PreRunMessage' out if there are subscribers...
[Pending] Removing all pending packages that should not be considered installed...
Performing validation checks.
Global Configuration Validation Checks:
 - Package Exit Code / Exit On Reboot = Checked
System State Validation Checks:
 Reboot Requirement Checks:
 - Pending Computer Rename = Checked
 - Pending Component Based Servicing = Checked
 - Pending Windows Auto Update = Checked
 - Pending File Rename Operations = Ignored
 - Pending Windows Package Installer = Checked
 - Pending Windows Package Installer SysWow64 = Checked
Cache Folder Lockdown Checks:
 - Elevated State = Failed
The source 'https://community.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='list'|
CacheLocation='C:\Users\mahmo\AppData\Local\Temp\chocolatey'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://community.chocolatey.org/api/v2/'|SourceType='normal'|
IncludeConfiguredSources='False'|ShowOnlineHelp='False'|Debug='True'|
Verbose='True'|Trace='False'|Force='False'|Noop='False'|
HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='True'|
DisableCompatibilityChecks='False'|AcceptLicense='False'|
AllowUnofficialBuild='False'|AllVersions='False'|
SkipPackageInstallProvider='False'|SkipHookScripts='False'|
Prerelease='False'|ForceX86='False'|OverrideArguments='False'|
NotSilent='False'|ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
CacheExpirationInMinutes='30'|AllowDowngrade='False'|
ForceDependencies='False'|PinPackage='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.22631.0'|
Information.PlatformName='Windows 11'|
Information.ChocolateyVersion='2.4.0.0'|
Information.ChocolateyProductVersion='2.4.0'|
Information.FullName='choco, Version=2.4.0.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='mahmo'|Information.UserDomainName='MUSOFTWARE'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='False'|
Information.IsLicensedVersion='False'|
Information.IsLicensedAssemblyLoaded='False'|
Information.LicenseType='Foss'|
Information.CurrentDirectory='C:\Users\mahmo'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseEnhancedExitCodes='False'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.SkipPackageUpgradesWhenNotInstalled='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ExitOnRebootDetected='False'|
Features.LogValidationResultsOnWarnings='True'|
Features.UsePackageRepositoryOptimizations='True'|
Features.UsePackageHashValidation='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'|
ListCommand.ExplicitPageSize='False'|
ListCommand.ExplicitSource='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
UpgradeCommand.IgnorePinned='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'|
ApiKeyCommand.Command='Unknown'|PinCommand.Command='Unknown'|
OutdatedCommand.IgnorePinned='False'|
ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'|
TemplateCommand.Command='unknown'|CacheCommand.Command='Unknown'|
CacheCommand.RemoveExpiredItemsOnly='False'|
_ Chocolatey:ChocolateyListCommand - Normal Run Mode _
Searching for package information
Running list with the following filter = ''
--- Start of List ---
Process Tree: Chocolatey CLI => Chocolatey CLI => powershell => explorer
Updating User Agent to 'Chocolatey Command Line/2.4.0 (Chocolatey CLI) via NuGet Client/6.4.1 (Microsoft Windows NT 10.0.22631.0)'.
Resolving resource PackageSearchResource for source C:\ProgramData\chocolatey\lib
chocolatey 2.4.0
 Title: Chocolatey | Published: 11/13/2024
 Number of Downloads: n/a | Downloads for this version: n/a
 Package url
 Chocolatey Package Source: https://github.com/chocolatey/choco/tree/develop/nuspec/chocolatey/chocolatey
 Tags: nuget apt-get machine repository chocolatey
 Software Site: https://github.com/chocolatey/choco
 Software License: https://raw.githubusercontent.com/chocolatey/choco/master/LICENSE
 Software Source: https://github.com/chocolatey/choco
 Documentation: https://docs.chocolatey.org/en-us/
 Mailing List: https://groups.google.com/forum/#!forum/chocolatey
 Issues: https://github.com/chocolatey/choco/issues
 Summary: Chocolatey is the package manager for Windows (like apt-get but for Windows)
 Description: Chocolatey is a package manager for Windows (like apt-get but for Windows). It was designed to be a decentralized framework for quickly installing applications and tools that you need. It is built on the NuGet infrastructure currently using PowerShell as its focus for delivering packages from the distros to your door, err computer.

  Chocolatey is brought to you by the work and inspiration of the community, the work and thankless nights of the [Chocolatey Team](https://github.com/orgs/chocolatey/people), with Rob heading up the direction.

  You can host your own sources and add them to Chocolatey, you can extend Chocolatey's capabilities, and folks, it's only going to get better.

  ### Information

  - [Chocolatey Website and Community Package Repository](https://community.chocolatey.org)
  - [Mailing List](http://groups.google.com/group/chocolatey) / [Release Announcements Only Mailing List](https://groups.google.com/group/chocolatey-announce) / [Build Status Mailing List](http://groups.google.com/group/chocolatey-build-status)
  - [Twitter](https://twitter.com/chocolateynuget) / [Facebook](https://www.facebook.com/ChocolateySoftware) / [GitHub](https://github.com/chocolatey)
  - [Blog](https://blog.chocolatey.org/) / [Newsletter](https://chocolatey.us8.list-manage1.com/subscribe?u=86a6d80146a0da7f2223712e4&id=73b018498d)
  - [Documentation](https://docs.chocolatey.org/en-us/) / [Support](https://chocolatey.org/support)

  ### Commands

  There are quite a few commands you can call - you should check out the [command reference](https://docs.chocolatey.org/en-us/choco/commands). Here are the most common:

  - Help - choco -? or choco command -?
  - Search - choco search something
  - List - choco list -lo
  - Config - choco config list
  - Install - choco install baretail
  - Pin - choco pin windirstat
  - Outdated - choco outdated
  - Upgrade - choco upgrade baretail
  - Uninstall - choco uninstall baretail

  #### Alternative installation sources:

  - Install ruby gem - choco install compass -source ruby
  - Install python egg - choco install sphynx -source python
  - Install windows feature - choco install IIS -source windowsfeatures

  #### More

  For more advanced commands and switches, use `choco -?` or `choco command -h`. You can also look at the [command reference](https://docs.chocolatey.org/en-us/choco/commands), including how you can force a package to install the x86 version of a package.

  ### Create Packages?

  We have some great guidance on how to do that. Where? I'll give you a hint, it rhymes with socks! [Docs!](https://docs.chocolatey.org/en-us/create/create-packages)

  In that mess there is a link to the [PowerShell Chocolatey module reference](https://docs.chocolatey.org/en-us/create/functions).
 Release Notes: See all - https://docs.chocolatey.org/en-us/choco/release-notes

php 5.6.7
 Title: PHP (Hypertext Preprocessor) | Published: 11/13/2024
 Number of Downloads: n/a | Downloads for this version: n/a
 Package url
 Chocolatey Package Source: n/a
 Tags: php admin
 Software Site: http://www.php.net/
 Software License: http://us.php.net/license/
 Summary: PHP - widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
 Description: PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
 Remembered Package Arguments:
  --cache-location='C:\Users\mahmo\AppData\Local\Temp\chocolatey'

--- End of List ---
2 packages installed.
Sending message 'PostRunMessage' out if there are subscribers...
Exiting with 0

Additional Context

No response

pauby commented 2 days ago

The version you are looking to install was approved on 23 March 2015. It uses Get-BinRoot which is no longer a Chocolatey helper function.

This isn't a Chocolatey CLI issue, but a package one. Please contact the package maintainer if you need more information on this.