-
Notifications
You must be signed in to change notification settings - Fork 942
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
https://github.com/microsoft/azure-pipelines-yaml/blob/master/templates/php.yml Not working #613
Comments
Hi @pritam97, thank you for the question. Can I ask what pool you use in your pipeline? Do you use an MS hosted or self-hosted agent? For example, for ubuntu-2204 the latest preinstalled version of PHP is 8.1.2: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#php-tools In any case, I think you can install the version of PHP that you need in an earlier step in your pipeline and then use the same set of update-alternatives commands to set up symlinks |
I am using microsoft hosted agent, but i want use php 8.2 or 8.3 above yaml is not working |
@pritam97 I think you can use a command from your distribution's package manager that will download the needed version of php just before this line: azure-pipelines-yaml/templates/php.yml Line 17 in d0943c1
Or you can switch to a pool such as ubuntu-2004, which has php 8.2 and 8.3 preinstalled: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md#php-tools |
@pritam97, for me using a Microsoft-hosted agent anyway, in my yml, I changed from ubuntu-latest to ubuntu-24.04. ubuntu-latest is 2204 like @aleksandrlevochkin mentioned, with the 8.1.2 php version.
Ref: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml |
While setting up php version 8.2 getting below error
update-alternatives: error: alternative /usr/bin/php8.2 for php not registered; not setting
update-alternatives: error: alternative /usr/bin/phar8.2 for phar not registered; not setting
update-alternatives: error: alternative /usr/bin/phpdbg8.2 for phpdbg not registered; not setting
update-alternatives: error: alternative /usr/bin/php-cgi8.2 for php-cgi not registered; not setting
update-alternatives: error: alternative /usr/bin/phar.phar8.2 for phar.phar not registered; not setting
The text was updated successfully, but these errors were encountered: