在安装php7.4中的gmp扩展时报错:
GNU MP Library version 4.2 or greater required
安装的日志如下:
Configuring for: PHP Api Version: 20190902 Zend Module Api No: 20190902 Zend Extension Api No: 320190902 checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for pkg-config... /bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for PHP prefix... /www/server/php/74 checking for PHP includes... -I/www/server/php/74/include/php -I/www/server/php/74/include/php/main -I/www/server/php/74/include/php/TSRM -I/www/server/php/74/include/php/Zend -I/www/server/php/74/include/php/ext -I/www/server/php/74/include/php/ext/date/lib checking for PHP extension directory... /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902 checking for PHP installed headers prefix... /www/server/php/74/include/php checking if debug is enabled... no checking if zts is enabled... no checking for gawk... gawk checking for GNU MP support... yes, shared checking for __gmpz_rootrem in -lgmp... no configure: error: GNU MP Library version 4.2 or greater required. make: *** No targets specified and no makefile found. Stop. error |-Successify --- 命令已执行! ---
解决方法:
apt update & apt install libgmp-dev
root@linux:~# apt install libgmp-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libgmpxx4ldbl Suggested packages: gmp-doc libgmp10-doc libmpfr-dev The following NEW packages will be installed: libgmp-dev libgmpxx4ldbl 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 980 kB of archives. After this operation, 2,322 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian bullseye/main amd64 libgmpxx4ldbl amd64 2:6.2.1+dfsg-1+deb11u1 [338 kB] Get:2 http://deb.debian.org/debian bullseye/main amd64 libgmp-dev amd64 2:6.2.1+dfsg-1+deb11u1 [643 kB] Fetched 980 kB in 0s (2,827 kB/s) Selecting previously unselected package libgmpxx4ldbl:amd64. (Reading database ... 71066 files and directories currently installed.) Preparing to unpack .../libgmpxx4ldbl_2%3a6.2.1+dfsg-1+deb11u1_amd64.deb ... Unpacking libgmpxx4ldbl:amd64 (2:6.2.1+dfsg-1+deb11u1) ... Selecting previously unselected package libgmp-dev:amd64. Preparing to unpack .../libgmp-dev_2%3a6.2.1+dfsg-1+deb11u1_amd64.deb ... Unpacking libgmp-dev:amd64 (2:6.2.1+dfsg-1+deb11u1) ... Setting up libgmpxx4ldbl:amd64 (2:6.2.1+dfsg-1+deb11u1) ... Setting up libgmp-dev:amd64 (2:6.2.1+dfsg-1+deb11u1) ... Processing triggers for libc-bin (2.31-13+deb11u11) ...




最新评论