无法在mac os上安装ext-msgpack扩展

时间:2018-05-15 14:14:15

标签: php macos php-extension php-7.1

我无法安装msgpack php扩展,这是我的项目所必需的。 我的环境是php 7.1,mac OS。错误如下所示:

Problem 1
- The requested PHP extension ext-msgpack * is missing from your system. Install or enable PHP's msgpack extension.

我尝试使用brew安装,但仍然可以。

1 个答案:

答案 0 :(得分:0)

尝试使用brew

$ brew install php

然后

$ pecl install msgpack

这是php -m的输出:

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
msgpack
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
phpdbg_webhelper
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

目前brew将安装版本7.2

$ php -v
PHP 7.2.8 (cli) (built: Jul 19 2018 12:15:24) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.8, Copyright (c) 1999-2018, by Zend Technologies