本文介绍了无法启用ext-gmp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我一直在尝试在Macbook pro上启用gmp,但无济于事.

So I've been trying to enable gmp on my macbook pro, but upto no avail.

这是我到目前为止所做的.

Here's what I've done till now.

  1. /private/etc/php.ini中未注释的extension=php_gmp.dll
  2. /usr/local/php5/lib/php.ini中未注释的extension=php_gmp.dll(配置文件显示在phpinfo()中)
  3. phpinfo()说启用了gmp,但是当我执行php -m时,它没有显示gmp.
  1. Uncommented extension=php_gmp.dll in /private/etc/php.ini
  2. Uncommented extension=php_gmp.dll in /usr/local/php5/lib/php.ini(coonfiguration file as displayed in phpinfo() )
  3. phpinfo() says gmp is enabled, but when I do php -m, it doesntshows gmp.

我该怎么办?

推荐答案

您未注释的行就是示例.该扩展程序实际上并不存在于您的系统上-您需要先安装该扩展程序,然后才能启用它.

The lines that you're uncommenting are examples. The extension is not actually present on your system -- you need to install the extension before you can enable it.

最简单的方法可能是通过 Homebrew 安装扩展程序.如果已安装Homebrew,则可以通过运行brew install php72-gmp安装扩展.

The easiest way of doing this will probably be to install the extension through Homebrew. If you have Homebrew installed, you can install the extension by running brew install php72-gmp.

这篇关于无法启用ext-gmp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 06:31