在尝试运行 SimpleSAML 项目上的 composer update
命令时,我遇到了以下错误。
- openid/php-openid dev-master requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
运行`sudo apt-get install php5-gmp`没有起作用,`sudo apt-get install php7-gmp`也不行。
包管理器
或 依赖管理器
进行搜索。对于 yum
,您可以使用 yum search gmp
进行搜索,然后进行安装。yum search gmp
Loaded pluginss: extras_suggestions, langpacks, priorities, update-motd
170 packages excluded due to repository priority protections
========================================================= N/S matched: gmp ==========================================================
perl-Math-BigInt-GMP.x86_64 : Math::BigInt::GMP Perl module
python-gmpy2.x86_64 : Python 2 interface to GMP, MPFR, and MPC
gmp.x86_64 : A GNU arbitrary precision library
gmp.i686 : A GNU arbitrary precision library
gmp-devel.x86_64 : Development tools for the GNU MP arbitrary precision library
gmp-static.x86_64 : Development tools for the GNU MP arbitrary precision library
mingw32-gmp.noarch : Cross-compiled GNU arbitrary precision library
mingw64-gmp.noarch : Cross-compiled GNU arbitrary precision library
perl-Math-GMP.x86_64 : High speed arbitrary size integer math
php-gmp.x86_64 : A module for PHP applications for using the GNU MP library
yum install php-gmp.x86_64
尝试使用 PHP 7.3。
sudo apt-get install php7.3 -gmp
extension=php_gmp.so
在Ubuntu中
apt search php gmp
可以给你列出相关的软件包列表,它建议如果你使用当前默认版本的 PHP,则应该安装 php-gmp,或者如果你非常明确地想要使用 PHP 版本 7.0,则应该安装 php7.0-gmp。 - Marc Glisseapt search php gmp
是一个很好的做法。 - Sam Malayek