简体   繁体   English

Google Cloud Client Library PHP安装失败

[英]Google Cloud Client Library PHP Install Failed

I try to install Google Cloud Client Library for PHP with composer via terminal. 我尝试通过终端使用composer安装适用于PHP的Google Cloud Client Library。

I already have composer in my server, and I run this code: 我的服务器中已经有了composer,我运行了这段代码:

composer require google/cloud

But unfortunately it's failed and give this return error: 但不幸的是它失败并给出了这个返回错误:

Fatal error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:///opt/cpanel/composer/bin/composer/vendor/symfony/polyfill-mbstring/Mbstring.php on line 513

I don't understand what is wrong? 我不明白有什么不对?

Thanks 谢谢

Run this command: 运行此命令:

php --ri iconv

If it says, iconv support => enabled , you're good to go. 如果它说, iconv support => enabled ,你就可以了。 If not, then you need to install it. 如果没有,那么你需要安装它。 This depends on whether you have built your version of PHP by hand, (you compiled it), or if you've installed it from another package provider. 这取决于您是否手动构建了PHP版本(编译它),或者是否已从其他软件包提供程序安装它。 Most likely, you have installed PHP from some other source rather than building it by hand. 最有可能的是,您已经从其他来源安装了PHP,而不是手工构建它。 So run: 所以运行:

sudo apt-get install php-iconv

Replacing apt-get with whatever your package manager is for your distro. 用你的包管理器替换apt-get用于你的发行版。

This command will probably tell you that this is provided by another package and will suggest you install that package. 此命令可能会告诉您这是由另一个包提供的,并建议您安装该包。 Go install that package. 去安装那个包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM