Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Can';t安装编写器-缺少json扩展_Php_Json_Ubuntu_Composer Php - Fatal编程技术网

Php Can';t安装编写器-缺少json扩展

Php Can';t安装编写器-缺少json扩展,php,json,ubuntu,composer-php,Php,Json,Ubuntu,Composer Php,我试图在我的Ubuntu 13.10计算机上安装composer,但出现以下错误: 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 witho

我试图在我的Ubuntu 13.10计算机上安装composer,但出现以下错误:

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

php--version
为我提供了
PHP5.5.3-1ubuntu2(cli)
,因此我认为它应该安装json扩展。

只需安装模块:

sudo apt-get install php5-json

编辑-原因:

见评论:


由于许可证冲突,它已在最近的软件包中删除


发出命令'php-m',然后请粘贴已安装模块的列表(json应该是其中之一)[php模块]bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv libxml mbstring mhash mysql mysqli openssl PCTL pcre PDO PDO PDO_mysql Phar posix readline Reflection session shmop SimpleXML soap Socket SPL标准Sysvsg sysvsem sysvshm标记器wddx xml xmlreader xmlwriter Zend OPcache zlib[Zend Modules]Zend Opcache请原谅,我主要是CentOS管理员,只有两台ubuntu服务器是静态的。不过,我相信您希望执行以下操作:sudo apt get install php5-jsonphp7 centos sudo yum install php70u json运行正常,谢谢。但是json扩展在默认情况下不应该捆绑并编译到PHP中吗?PHP的核心相当小,所有都分组在模块中。如果您从源代码处编译,默认情况下会选择许多模块(如json)。但是软件包维护人员似乎想让用户对他想要安装的东西有更多的控制权。这在大多数情况下都很好。由于许可证冲突,它已在最近的软件包中被删除(请参阅)。如果php json是php common的一个依赖项,那么每个人都会在升级到13.10时安装它。这浪费了我足够多的时间来提交错误:以及原因。。因为他觉得自己很有趣。。。