简体   繁体   English

Amazon EC2 Linux 2 PHP GMP 安装/启用

[英]Amazon EC2 Linux 2 PHP GMP install/enable

I have a new instance of EC2 running Amazon Linux2 with PHP.我有一个使用 PHP 运行 Amazon Linux2 的 EC2 新实例。 I am unable to enable PHP GMP for CLI.我无法为 CLI 启用 PHP GMP。 I am able to install GMP using:我可以使用以下方法安装 GMP:

`yum install gmp-devel`

I have also tried modifying my php.ini by adding:我还尝试通过添加以下内容来修改我的 php.ini:

`extension=gmp.so`

and restarting the web server.并重新启动网络服务器。 I cannot find any documentation on GMP other than Amazon stating that the GMP extension is part of the core.除了亚马逊,我找不到任何关于 GMP 的文档,说明 GMP 扩展是核心的一部分。 ( https://aws.amazon.com/amazon-linux-2/faqs/ ) I am verifying the extension using PHP as follows: ( https://aws.amazon.com/amazon-linux-2/faqs/ ) 我正在使用 PHP 验证扩展,如下所示:

`if (!extension_loaded("gmp")) die("NO GMP");`

Soooo aggravating!太严重了! What am I doing wrong?我究竟做错了什么?

I had the same problem.我有同样的问题。 you can restart app server from elastic beanstalk for fixed this issue screenshot您可以从弹性 beanstalk 重新启动应用程序服务器以修复此问题屏幕截图

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

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