I am experiencing the same as @Jimmy03
see log at https://github.com/chocolatey/choco/issues/1574
I tried uninstalling and upgrading from PHP 7.2.3 > 7.2.5 https://chocolatey.org/packages/php
I'm using Win 10 x64 running chocolatey v0.10.11
Other packages work fine, only PHP has the problem
Here's the error msg from running chocolatey uninstall php --debug --trace:
ERROR: Cannot bind argument to parameter 'Path' because it is null.
at Uninstall-ChocolateyZipPackage, C:\ProgramData\chocolatey\helpers\functions\UnInstall-ChocolateyZipPackage.ps1: line 71
at UninstallPackage, C:\ProgramData\chocolatey\lib\php\tools\helpers.ps1: line 77
at <ScriptBlock>, C:\ProgramData\chocolatey\lib\php\tools\chocolateyUninstall.ps1: line 9
at <ScriptBlock>, C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1: line 48
at <ScriptBlock>, <No file>: line 1
Can u provide install log?
@majkinetor a log is a available at chocolatey/choco#1574
Install log please, not uninstall log.
Seing as it fails on the uninstall with the function Uninstall-ChocolateyZipPackage (which is also used when upgrading), I would say this is related to a bug in chocolatey with a issue already opened there:
https://github.com/chocolatey/choco/issues/1550
Yes same issue as mine.
Let me know if any other logs are needed.
ShadowDancer437 Sharak • 3 months ago
Looks like the problem is actually in the uninstall script from Chocolatey.
https://github.com/chocolat...
As a workaround (until this is fixed in Chocolatey), if you wish to upgrade now:
This worked for me, but take extra care if you follow these instructions.
I think that is good way to go until this is fixed.
The instructions at https://github.com/chocolatey/chocolatey-coreteampackages/issues/1047#issuecomment-405096203 worked for me:
cd c:\tools
move php72 php72.bak
choco uninstall php -n -y
choco install php -y
:: only if you want to keep your old php.ini file:
xcopy /y php72.bak\php.ini php72\
rmdir /s /q php72.bak
Thanks for the script @rasa
Since upstream ticket (https://github.com/chocolatey/choco/issues/1550) is fixed, I guess this will start to work as usual on next chocolatey version.
Just to give you some feedback: I've just updated to the latest beta version of chocolatey, and this makes the update work again :)
I had the problem again, and php73 is now the latest version:
cd c:\tools
move php73 php73.bak
choco uninstall php -n -y
choco install php -y
:: only if you want to keep your old php.ini file:
xcopy /y php73.bak\php.ini php73\
rmdir /s /q php73.bak
Still having the problem upgrading from php 7.3.0 to 7.3.1. The above fixed it (again):
```
You have php v7.3.0 installed. Version 7.3.1 is available based on your source(s).
Progress: Downloading php 7.3.1... 100%
php v7.3.1 [Approved]
php package files upgrade completed. Performing other installation steps.
Uninstalling previous version of php...
ERROR: Cannot bind argument to parameter 'Path' because it is null.
The upgrade of php was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\php\tools\chocolateyInstall.ps1'.
See log for details.
In a method of evacuating to php.bak and upgrading, need to reinstall the dependency composer, so I want somehow.
@rasa have you updated Chocolatey to the latest beta version? The stable version does not contain a fix yet
@NicoHaase:
https://www.google.com/search?q=chocolatey+beta returned https://chocolatey.org/packages/chocolatey which says to run:
choco install chocolatey --pre
but that's a no-op on my box:
C:\>choco install chocolatey --pre
Chocolatey v0.10.11 Professional
Installing the following packages:
chocolatey
By installing you accept licenses for the packages.
chocolatey v0.10.11 already installed.
Use --force to reinstall, specify a version to install, or try upgrade.
Chocolatey installed 0/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Warnings:
- chocolatey - chocolatey v0.10.11 already installed.
Use --force to reinstall, specify a version to install, or try upgrade.
Any ideas?
You could try running it with a specific version number like:
choco install chocolatey --version Chocolatey 0.10.12-beta-20181011 --pre
@rasa @NicoHaase
or just do choco upgrade chocolatey --pre which would be the correct way to ugrade to a beta release.
@AdmiringWorm @NicoHaase Doh, of course. Thanks for help, and sorry for the noise.
Most helpful comment
ShadowDancer437 Sharak • 3 months ago
Looks like the problem is actually in the uninstall script from Chocolatey.
https://github.com/chocolat...
As a workaround (until this is fixed in Chocolatey), if you wish to upgrade now:
This worked for me, but take extra care if you follow these instructions.