Neha
Neha

Reputation: 389

How to install json extension for PHP 7 on CentOS?

On my server I had PHP 5 installed previously .I upgraded it to PHP 7 by following the steps from here But when I try to install the composer for the using laravel ,it shows

The json extension is missing.Install it or recompile php without --disable-json" 

Then I tried installing the json extension on the server ,it shows the following error

Error: php70u-cli conflicts with php-cli-5.5.38-8.el7.remi.x86_64
Error: php70u-common conflicts with php-common-5.5.38-8.el7.remi.x86_64

After hours of searching the internet, I couldn't still find any solution. Can somebody help me please ?

Upvotes: 2

Views: 14848

Answers (2)

Rajitha Hewabandula
Rajitha Hewabandula

Reputation: 1

You can install JSON extension for PHP 7 in centos using below command:

yum install php-json

…on centos 8 running php 7.2

Upvotes: 0

Bhavin Solanki
Bhavin Solanki

Reputation: 1364

You can install JSON extension for PHP 7 in centos using below command.

sudo yum install php70u-json

Upvotes: 1

Related Questions