【发布时间】:2015-02-10 18:49:18
【问题描述】:
我在 Linux 终端中写道:
curl -s https://getcomposer.org/installer | php
它说:
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The json extension is missing.
Install it or recompile php without --disable-json
我这样做了:apt-get install php5-json
所以,我认为,它已安装。但奇怪的是,当我写php -m
它给了我一个没有 json 的列表:
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
libxml
mbstring
mhash
openssl
pcntl
pcre
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
当我写php5-fpm -m
它发送这个:
[PHP Modules]
bcmath
bz2
calendar
cgi-fcgi
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mhash
mysqli
openssl
pcre
PDO
pdo_mysql
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
我做错了什么?我在 GitHub 和 Google 上都没有找到解决方案
【问题讨论】:
-
愚蠢的问题:你重启了服务器,不是吗?
-
是的,我做到了。不幸的是,它没有帮助
标签: php json linux composer-php