略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: 安装

2024-12-21

安装

In order to have these functions available, PHP must be compiled with GMP support by using the --with-gmp option.

add a noteadd a note

User Contributed Notes 11 notes

up
6
1602352639 at qq dot com
1 year ago
ubuntu

sudo apt install php-gmp
up
-2
Elydreams Trend
7 months ago
On Debian platforms, make sure you install the gmp development library first:

    sudo apt-get install libgmp-dev

Just like other extensions, you need the libs installed before php compile will gracefully complete all.
up
-5
sean at crazyhorsecoding dot com
8 years ago
on Ubuntu Server:

sudo apt-get install libgmp-dev
sudo apt-get install php5-gmp
sudo service apache2 reload
up
-5
arancaytar dot ilyaran at gmail dot com
13 years ago
Note that this parameter requires a path, as in --with-gmp=DIR, if gmp is installed in a non-standard location, which is almost always the case when you are building your own PHP installation in your home directory.

Obvious, but it's an easy mistake.
up
-10
Chris
13 years ago
Under Windows you will need to uncomment the line

;extension=php_gmp.dll

within the php.ini and restart Apache.
up
-9
omagaldadze at yahoo dot com
9 years ago
On ArchLinux php 5.4.14-1 I had to uncomment the line

extension=gmp.so

in /etc/php/php.ini file.

Probably, restart of web server (e.g. Apache) is required if working from web.
up
-11
oharry0535 at gmail dot com
3 years ago
Under Windows you will need to un-comment the line in your php.ini file

;extension=gmp

within the php.ini and restart Apache.
up
-12
insign at gmail dot com
5 years ago
Simple run:
   sudo apt install php7.0-gmp
up
-10
MiquelFire
12 years ago
With PHP 5.3 on Windows, you need to use the VC9 build, otherwise you will not have the dll to enable GMP
up
-17
mike dot mackintosh at angrystatic dot com
9 years ago
On Debian platforms, make sure you install the gmp development library first:

    sudo apt-get install libgmp-dev

Just like other extensions, you need the libs installed before php compile will gracefully complete.
up
-20
admin at ee-dd dot com
10 years ago
on ubuntu you can get it from Synaptic Package Manager
just search words "gmp",you'll find it.

官方地址:https://www.php.net/manual/en/gmp.installation.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3