Trying to install wordpress in google cloud flex appengine; getting error in "gcloud app deploy"

327 views Asked by At

I am following the steps at https://cloud.google.com/php/tutorials/wordpress-app-engine-flexible. I am on ubuntu 22.

The "gcloud app deploy --promote --stop-previous-version app.yaml cron.yaml" step fails with an error:

Step #2: Using PHP version: 7.3
Step #2: Install PHP extensions...
Step #2: Running composer...
Step #2: Loading composer repositories with package information
Step #2: Installing dependencies from lock file
Step #2: Your requirements could not be resolved to an installable set of packages.
Step #2: 
Step #2:   Problem 1
Step #2:     - Installation request for brick/math 0.10.2 -> satisfiable by brick/math[0.10.2].
Step #2:     - brick/math 0.10.2 requires php ^7.4 || ^8.0 -> your PHP version (7.3.19) does not satisfy that requirement.
Step #2:   Problem 2
Step #2:     - Installation request for psr/cache 3.0.0 -> satisfiable by psr/cache[3.0.0].
Step #2:     - psr/cache 3.0.0 requires php >=8.0.0 -> your PHP version (7.3.19) does not satisfy that requirement.
Step #2:   Problem 3
Step #2:     - Installation request for psr/log 3.0.0 -> satisfiable by psr/log[3.0.0].
Step #2:     - psr/log 3.0.0 requires php >=8.0.0 -> your PHP version (7.3.19) does not satisfy that requirement.
Step #2:   Problem 4
Step #2:     - Installation request for ramsey/uuid 4.5.1 -> satisfiable by ramsey/uuid[4.5.1].
Step #2:     - ramsey/uuid 4.5.1 requires php ^8.0 -> your PHP version (7.3.19) does not satisfy that requirement.
Step #2:   Problem 5
Step #2:     - Installation request for symfony/deprecation-contracts v3.1.1 -> satisfiable by symfony/deprecation-contracts[v3.1.1].
Step #2:     - symfony/deprecation-contracts v3.1.1 requires php >=8.1 -> your PHP version (7.3.19) does not satisfy that requirement.
Step #2:   Problem 6
Step #2:     - psr/cache 3.0.0 requires php >=8.0.0 -> your PHP version (7.3.19) does not satisfy that requirement.
Step #2:     - google/grpc-gcp v0.2.0 requires psr/cache ^1.0.1||^2.0.0||^3.0.0 -> satisfiable by psr/cache[3.0.0].
Step #2:     - Installation request for google/grpc-gcp v0.2.0 -> satisfiable by google/grpc-gcp[v0.2.0].
Step #2: 
Step #2: error building image: error building stage: waiting for process to exit: exit status 2
Finished Step #2
ERROR

Don't know how to go past this error. And stranglely, it says "Using PHP version: 7.3", but I have only version 8.1 installed:

ls -l /usr/bin/php*
lrwxrwxrwx 1 root root      21 Sep 27 12:58 /usr/bin/php -> /etc/alternatives/php
-rwxr-xr-x 1 root root 5531064 Aug  8 00:28 /usr/bin/php8.1
lrwxrwxrwx 1 root root       6 Jan 27  2022 /usr/bin/php.default -> php8.1

Where does it find that version 7.3?

Note: Running command "composer install" passes: Nothing to install, update or remove.

Here is my composer.json file:

{
    "require": {
        "google/cloud": "~0.21",
        "php": "^7.3|^8.0"
    },
    "require-dev": {
        "wp-cli/wp-cli": "~2.0"
    }
}

I edited the "php" line above, with no success.

Please help.

1

There are 1 answers

1
innerpeace On

currently, it does not support version 8.1 and so defaults to 7.3

remove php8 and install php7.3 and redo all steps mentioned here:https://cloud.google.com/php/tutorials/wordpress-app-engine-flexible

run php -v to ensure you are not running php8 then run the helper script: php wordpress.php setup