我正在尝试将我的新 Laravel 项目部署到 Google App Engine,但是它没有说“PHP extension bcmath is missing”。我使用Laradock,所以我可以让我的项目在 Docker 容器中运行。
以下是 Google Cloud 日志的结尾:
Step #1: INFO[0000] Removing ignored files from build context: [.dockerignore Dockerfile .git .hg .svn *~ .\#* app.yaml]
Step #1: INFO[0001] Downloading base image gcr.io/google-appengine/php72@sha256:0f0d6c07035fd5138d917b4d539f4473ca13528f11c26c92be54b9e33c0f722b
Step #1: INFO[0013] Taking snapshot of full filesystem...
Step #1: INFO[0020] ENV DOCUMENT_ROOT='/app/public' APP_LOG='errorlog' APP_KEY='base64:ak4/ZLdvSpRF3JDRPuR8mgzzGB8GXGuLVF/PP8qnTH4=' STORAGE_DIR='/tmp' FRONT_CONTROLLER_FILE='index.php' COMPOSER_FLAGS='--no-dev --prefer-dist' DETECTED_PHP_VERSION='7.2'
Step #1: INFO[0020] Using files from context: [/workspace]
Step #1: INFO[0020] COPY . $APP_DIR
Step #1: INFO[0022] Taking snapshot of files...
Step #1: INFO[0024] RUN chown -R www-data.www-data $APP_DIR
Step #1: INFO[0024] cmd: /bin/sh
Step #1: INFO[0024] args: [-c chown -R www-data.www-data $APP_DIR]
Step #1: INFO[0024] Taking snapshot of full filesystem...
Step #1: INFO[0032] RUN /build-scripts/composer.sh
Step #1: INFO[0032] cmd: /bin/sh
Step #1: INFO[0032] args: [-c /build-scripts/composer.sh]
Step #1: Using PHP version: 7.2
Step #1: Install PHP extensions...
Step #1: Running composer...
Step #1: Loading composer repositories with package information
Step #1: Installing dependencies from lock file
Step #1: Your requirements could not be resolved to an installable set of packages.
Step #1:
Step #1: Problem 1
Step #1: - Installation request for moontoast/math 1.1.2 -> satisfiable by moontoast/math[1.1.2].
Step #1: - moontoast/math 1.1.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
Step #1: Problem 2
Step #1: - moontoast/math 1.1.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
Step #1: - laravel/telescope v1.0.10 requires moontoast/math ^1.1 -> satisfiable by moontoast/math[1.1.2].
Step #1: - Installation request for laravel/telescope v1.0.10 -> satisfiable by laravel/telescope[v1.0.10].
Step #1:
Step #1: To enable extensions, verify that they are enabled in your .ini files:
Step #1: - /opt/php72/lib/php-cli.ini
Step #1: - /opt/php72/lib/ext.enabled/ext-apcu-bc.ini
Step #1: - /opt/php72/lib/ext.enabled/ext-mailparse.ini
Step #1: - /opt/php72/lib/ext.enabled/ext-memcached.ini
Step #1: You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Step #1: error building image: error building stage: waiting for process to exit: exit status 2
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/kaniko-project/executor@sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870" failed: exit status 1
我尝试将 Laradock 的主 php.ini 复制到根项目文件夹,但这没有帮助。希望有人可以帮助我。