I want to install PECL on centos 7 with php7.4, I use this command on cPanel Terminal:
sudo yum install php-pear
but I got this error:
file /usr/bin/php from install of php-cli-5.4.16-48.el7.x86_64 conflicts with file from package ea-php-cli-1.0.0-9.10.1.cpanel.x86_64
Related
I am trying to install mycrypt-1.0.4 on RHEL 8 and it says mycrypt.h error Reinstall libmcrypt.
So, I am trying to install libmcrypt and I copied libmcrypt-2.5.8.tar.gz into tmp folder. Now when I ran this command
sudo dnf install /tmp/libmcrypt-2.5.8.tar.gz
it throws error. What I am doing wrong here? Please correct me.
Error: Unable to find a match: /tmp/libmcrypt-2.5.8
mcrypt-1.0.4 is a "php" module, to be installed with pecl.
Ref. https://pecl.php.net/package/mcrypt
0 # dnf install epel-release
1 # dnf install php-devel libmcrypt-devel php-pear
2. # pecl install mcrypt
... which will build "mcrypt-1.0.4" against php-devel and libmcrypt-devel-2.5.8
to : /usr/lib64/php/modules/mcrypt.so
This is the server configuration. I need to isntalll php v7.0.33
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
First I did yum install php but it installed php v7.3.
So, I removed it, and installed yum install php70
Now if I do php -v I get php command not found
But If I do php70 -v I get version.
I, now, setup everything successfully.
I followed below steps.
yum remove php70 && yum autoremove
yum -y install epel-release.noarch yum-utils
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum info php // it will show the version that will be install in the next setp
yum -y install php
I am new to Ec2. Where i have installed php 7. Php is running on ec2. But my php files are in 5.6. So whether running the file in php in ec2 linux. Its not working.
So i have decide to downgrade php 7.2 to php 5.6.
How to Downgrade it. or else How can i uninstall php 7. and reinstall php 5.6.
Thanks in Advance...
You can have multiple versions of PHP running on Linux.
$ sudo apt install php5.6
$ sudo apt install php7.0
$ sudo apt install php7.1
Use the update-alternative command to switch and set the default version of PHP you want to run:
sudo update-alternatives --set php /usr/bin/php5.6
Then confirm:
php -v
You could use remi repository. Try with these commands:
#!/bin/bash
yum -y update
sudo yum -y install amazon-linux-extras
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum-config-manager --enable remi-php56
sudo yum -y install php56-gd php56-curl php56-mysql php56-ldap php56-zip php56-fileinfo php56-php-pecl-zip
sudo scl enable php56 bash
You can find a complete guide in this link https://www.tecmint.com/install-php-5-6-on-centos-7/
I have Centos 7 and php 7.1. I want to install pecl and I tried that with yum install pecl but it has a conflict with php5.4.
How can I install mongodb driver without pecl or how can I fix pecl to work with php7.1?
I used pecl to install the mongo driver.
yum install php-pear
pecl install mongodb
note that there's also an old mongo driver that works for php5 but mongodb driver is for php7
You can Install mongodb manually with following commands:
First install php71w-devel package with following command:
sudo yum install php71w-devel -y
and then you can install it manually.
$ git clone https://github.com/mongodb/mongo-php-driver.git
$ cd mongo-php-driver
$ git submodule sync && git submodule update --init
$ phpize
$ ./configure
$ make all -j 5
$ sudo make install
ref:http://php.net/manual/en/mongodb.installation.manual.php
I want to install mongo driver manager as given here http://php.net/manual/en/mongodb.installation.pecl.php
Mongo is already running. pecl is not there in my instance. you can find my phpinfo here
Please guide me through the necessary steps.
EDIT
I have installed pecl,, now I suppose I have to install php-devel but I am getting the following error
Error: httpd24-tools conflicts with httpd-tools-2.2.31-1.8.amzn1.x86_64
Error: php56-cli conflicts with php-cli-5.3.29-1.8.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.31-1.8.amzn1.x86_64
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: php56 conflicts with php-5.3.29-1.8.amzn1.x86_64
Was able to install pecl using the following list of commands in php-5.6 ec2
sudo yum install php-pear
sudo yum install php56-devel
sudo yum install gcc
sudo yum install openssl-devel
sudo pecl install mongodb