우분투16 php-gmp 설치

(우분투 php-gmp 설치에서 넘어옴)

1 개요[ | ]

apt install php-gmp
우분투 php-gmp 설치
우분투16 php-gmp 설치
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) exto speed up arbitrary precision integer arithmetic operations.)

2 확인[ | ]

root@zetawiki:~# php -m | grep gmp
root@zetawiki:~# php -r "gmp_abs();"
PHP Fatal error:  Uncaught Error: Call to undefined function gmp_abs() in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1
root@zetawiki:~# apt list php-gmp
Listing... Done
php-gmp/xenial 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 all
N: There is 1 additional version. Please use the '-a' switch to see it

3 설치[ | ]

root@zetawiki:~# apt install php-gmp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php7.1-gmp
The following NEW packages will be installed:
  php-gmp php7.1-gmp
0 upgraded, 2 newly installed, 0 to remove and 92 not upgraded.
Need to get 25.7 kB of archives.
After this operation, 110 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-gmp amd64 7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1 [20.4 kB]
Get:2 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php-gmp all 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 [5,320 B]
Fetched 25.7 kB in 4s (5,818 B/s)
Selecting previously unselected package php7.1-gmp.
(Reading database ... 87246 files and directories currently installed.)
Preparing to unpack .../php7.1-gmp_7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.1-gmp (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ......................] 
Selecting previously unselected package php-gmp.........................................] 
Preparing to unpack .../php-gmp_1%3a7.1+53~ubuntu16.04.1+deb.sury.org+1_all.deb ...
Unpacking php-gmp (1:7.1+53~ubuntu16.04.1+deb.sury.org+1) ..............................] 
Processing triggers for libapache2-mod-php7.1 (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.1-gmp (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...
Progress: [ 63%] [#############################################.........................] 
Creating config file /etc/php/7.1/mods-available/gmp.ini with new version
Setting up php-gmp (1:7.1+53~ubuntu16.04.1+deb.sury.org+1) ...#######...................] 
Processing triggers for libapache2-mod-php7.1 (7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1) ...

4 확인 2[ | ]

root@zetawiki:~# apt list php-gmp
Listing... Done
php-gmp/xenial,now 1:7.1+53~ubuntu16.04.1+deb.sury.org+1 all [installed]
N: There is 1 additional version. Please use the '-a' switch to see it
root@zetawiki:~# php -m | grep gmp
gmp
root@zetawiki:~# php -r "gmp_abs();"
PHP Warning:  gmp_abs() expects exactly 1 parameter, 0 given in Command line code on line 1

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}