Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/231.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php google/cloud firestore v1.17.0需要ext grpc_Php_Google Cloud Firestore_Composer Php - Fatal编程技术网

Php google/cloud firestore v1.17.0需要ext grpc

Php google/cloud firestore v1.17.0需要ext grpc,php,google-cloud-firestore,composer-php,Php,Google Cloud Firestore,Composer Php,使用免费试用谷歌云平台并遵循指南: 在Cloud Shell终端上当我运行命令“php index.php”而不部署它时,一切正常。使用以下composer.json { "require": { "php": "7.2.*", "silex/silex": "^2.3", "google/cloud-firestore": "^1.1

使用免费试用谷歌云平台并遵循指南:

Cloud Shell终端上当我运行命令“php index.php”而不部署它时,一切正常。使用以下composer.json

{
  "require": {
    "php": "7.2.*",
    "silex/silex": "^2.3",
    "google/cloud-firestore": "^1.17",
    "grpc/grpc": "^v1.27.0",
    "google/protobuf": "^v3.3.0"
  },
  "require-dev": {
    "symfony/browser-kit": "^4.4",
    "symfony/http-kernel": "^4.4"
  }
}
但如果我部署它是为了生成一个web,如中的命令所示:

gcloud应用程序部署

它会得到以下错误:

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: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run
 `composer update` or `composer update <package name>`.
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 google/cloud-firestore v1.17.0 -> satisfiable by google/cloud-firestore[v1.17.0].
Step #1:     - google/cloud-firestore v1.17.0 requires ext-grpc * -> the requested PHP extension grpc is missing from your system.
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: step exited with non-zero statu
s: 1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/cloud-build/builds/0cc3bd85-9138-4273-a59e-86daf2065051?project=981117
417638 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details
步骤#1:使用PHP版本:7.2
步骤1:安装PHP扩展。。。
第1步:运行composer。。。
步骤#1:使用包信息加载composer存储库
步骤#1:从锁文件安装依赖项
步骤#1:警告:锁文件不是composer.json中最新更改的最新版本。您可能会得到过时的依赖项。建议您运行
`编写器更新`或`编写器更新'。
步骤#1:无法将您的需求解析为一组可安装的软件包。
第1步:
步骤1:问题1
步骤#1:-google/cloud firestore v1.17.0的安装请求->可由google/cloud firestore[v1.17.0]满足。
步骤#1:-google/cloud firestore v1.17.0需要ext grpc*->您的系统中缺少请求的PHP扩展grpc。
第1步:
步骤#1:要启用扩展名,请验证在.ini文件中是否启用了扩展名:
步骤1:-/opt/php72/lib/php-cli.ini
步骤1:-/opt/php72/lib/ext.enabled/ext-apcu-bc.ini
步骤1:-/opt/php72/lib/ext.enabled/ext-mailparse.ini
步骤1:-/opt/php72/lib/ext.enabled/ext-memcached.ini
步骤1:您还可以在终端内部运行'php--ini',查看php在CLI模式下使用哪些文件。
步骤#1:错误生成映像:错误生成阶段:等待进程退出:退出状态2
完成步骤#1
错误
错误:构建步骤1“gcr.io/kaniko-project/executor@sha256:F87C11770A4D3ED33436508D206C584812CD656E6ED08EDA1CF5C1EE44F5870“失败:以非零状态退出步骤
s:1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
错误:(gcloud.app.deploy)云构建失败。查看以下位置的日志:https://console.cloud.google.com/cloud-build/builds/0cc3bd85-9138-4273-a59e-86daf2065051?project=981117
417638故障状态:未知:错误响应:[2]生成失败;查看构建日志以了解详细信息
当然,我在/etc/php/7.2/cli/php.ini中添加了行扩展名=grpc.so。我执行命令php--ini以查找所有文件。
我知道这个问题似乎在重复,但这个问题还没有解决。

谷歌云SDK的每个版本都有改进。请运行命令:“gcloud组件更新”,然后再次尝试部署应用程序。