2

I ran the following commands:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install yum-utils
yum-config-manager --enable remi-php70

No errors at this stage.

When I ran:

yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

I got:

Loaded plugins: fastestmirror, universal-hooks
remi-php70                                                                                                                                                                                  | 2.9 kB  00:00:00     
remi-php70/primary_db                                                                                                                                                                       | 208 kB  00:00:00     
Loading mirror speeds from cached hostfile
 * EA4: 85.13.201.2
 * cpanel-addons-production-feed: 85.13.201.2
 * base: centos.mirrors.ovh.net
 * epel: mirror.nl.leaseweb.net
 * extras: centos.mirrors.ovh.net
 * remi-php70: remi.mirror.wearetriple.com
 * remi-safe: remi.mirror.wearetriple.com
 * updates: centos.mirrors.ovh.net
No package php available.
No package php-mcrypt available.
No package php-cli available.
No package php-gd available.
No package php-curl available.
No package php-mysql available.
No package php-ldap available.
No package php-zip available.
No package php-fileinfo available.
Error: Nothing to do

I ran: yum clean all and then ran the previous command again, but it changed nothing.

I ran a search: yum search php7 and while I see lots of packages, I'm not knowledgeable enough to make a decision.

Suggestions welcome!

Edit 1

Here is the result of running the: yum search php7 command:

Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
 * EA4: 85.13.201.2
 * cpanel-addons-production-feed: 85.13.201.2
 * base: centos.mirrors.ovh.net
 * epel: mirror.nl.leaseweb.net
 * extras: centos.mirrors.ovh.net
 * remi-php70: remi.mirror.wearetriple.com
 * remi-safe: remi.mirror.wearetriple.com
 * updates: centos.mirrors.ovh.net
================================================================================================ N/S matched: php7 ================================================================================================
ea-php70-libc-client-debuginfo.x86_64 : Debug information for package ea-php70-libc-client
ea-php70-php-debuginfo.x86_64 : Debug information for package ea-php70-php
ea-php70-php-ioncube6-debuginfo.x86_64 : Debug information for package ea-php70-php-ioncube6
ea-php70-runtime.x86_64 : Package that handles ea-php70 Software Collection.
ea-php70-scldevel.x86_64 : Package shipping development files for ea-php70
ea-php71-libc-client-debuginfo.x86_64 : Debug information for package ea-php71-libc-client
ea-php71-php-debuginfo.x86_64 : Debug information for package ea-php71-php
ea-php71-runtime.x86_64 : Package that handles ea-php71 Software Collection.
ea-php71-scldevel.x86_64 : Package shipping development files for ea-php71
ea-php72-libc-client-debuginfo.x86_64 : Debug information for package ea-php72-libc-client
ea-php72-php-debuginfo.x86_64 : Debug information for package ea-php72-php
ea-php72-runtime.x86_64 : Package that handles ea-php72 Software Collection.
ea-php72-scldevel.x86_64 : Package shipping development files for ea-php72
ea-php70.x86_64 : Package that installs PHP 7.0
ea-php70-build.x86_64 : Package shipping basic build configuration
ea-php70-libc-client.x86_64 : UW C-client mail library
ea-php70-libc-client-devel.x86_64 : Development tools for programs which will use the UW IMAP library
ea-php70-libc-client-static.x86_64 : UW IMAP static library
ea-php70-pear.noarch : PHP Extension and Application Repository framework
ea-php70-php.x86_64 : PHP DSO
ea-php70-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
ea-php70-php-bz2.x86_64 : A module for PHP applications that interface with .bz2 files
ea-php70-php-calendar.x86_64 : A module for PHP applications that need date/time calculations
ea-php70-php-cli.x86_64 : Command-line interface for PHP
ea-php70-php-common.x86_64 : Common files for PHP
ea-php70-php-curl.x86_64 : A module for PHP applications that need to interface with curl
ea-php70-php-dba.x86_64 : A database abstraction layer module for PHP applications
ea-php70-php-dbg.x86_64 : The interactive PHP debugger
ea-php70-php-devel.x86_64 : Files needed for building PHP extensions
ea-php70-php-enchant.x86_64 : Enchant spelling extension for PHP applications
ea-php70-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php70-php-fileinfo.x86_64 : A module for PHP applications that need to detect file types
ea-php70-php-fpm.x86_64 : PHP FastCGI Process Manager
ea-php70-php-ftp.x86_64 : A module for PHP applications that need full FTP protocol support
ea-php70-php-gd.x86_64 : A module for PHP applications for using the gd graphics library
ea-php70-php-gettext.x86_64 : A module for PHP applications that need native language support
ea-php70-php-gmp.x86_64 : A module for PHP applications for using the GNU MP library
ea-php70-php-iconv.x86_64 : A module for PHP applications that need to convert character sets
ea-php70-php-imap.x86_64 : A module for PHP applications that use IMAP
ea-php70-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php70-php-ioncube10.x86_64 : Experimental v10 Loader for ionCube-encoded PHP files
ea-php70-php-ioncube6.x86_64 : Experimental v6 Loader for ionCube-encoded PHP files
ea-php70-php-ldap.x86_64 : A module for PHP applications that use LDAP
ea-php70-php-litespeed.x86_64 : LiteSpeed Web Server PHP support
ea-php70-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
ea-php70-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
ea-php70-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases
ea-php70-php-odbc.x86_64 : A module for PHP applications that use ODBC databases
ea-php70-php-opcache.x86_64 : The Zend OPcache
ea-php70-php-pdo.x86_64 : A database access abstraction module for PHP applications
ea-php70-php-pgsql.x86_64 : A PostgreSQL database module for PHP
ea-php70-php-phalcon.x86_64 : A full-stack PHP framework delivered as a C-extension
ea-php70-php-posix.x86_64 : Modules for PHP scripts that need access to POSIX functions
ea-php70-php-process.x86_64 : Modules for PHP script using system process interfaces
ea-php70-php-pspell.x86_64 : A module for PHP applications for using pspell interfaces
ea-php70-php-recode.x86_64 : A module for PHP applications for using the recode library
ea-php70-php-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices
ea-php70-php-soap.x86_64 : A module for PHP applications that use the SOAP protocol
ea-php70-php-sockets.x86_64 : A module for PHP applications that need low-level access to sockets
ea-php70-php-sourceguardian.x86_64 : Loader for SourceGuardian-encoded PHP files
ea-php70-php-tidy.x86_64 : Standard PHP module provides tidy library support
ea-php70-php-xml.x86_64 : A module for PHP applications which use XML
ea-php70-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
ea-php70-php-zip.x86_64 : A module for PHP applications that need to handle .zip files
ea-php71.x86_64 : Package that installs PHP 7.1
ea-php71-build.x86_64 : Package shipping basic build configuration
ea-php71-libc-client.x86_64 : UW C-client mail library
ea-php71-libc-client-devel.x86_64 : Development tools for programs which will use the UW IMAP library
ea-php71-libc-client-static.x86_64 : UW IMAP static library
ea-php71-pear.noarch : PHP Extension and Application Repository framework
ea-php71-php.x86_64 : PHP DSO
ea-php71-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
ea-php71-php-bz2.x86_64 : A module for PHP applications that interface with .bz2 files
ea-php71-php-calendar.x86_64 : A module for PHP applications that need date/time calculations
ea-php71-php-cli.x86_64 : Command-line interface for PHP
ea-php71-php-common.x86_64 : Common files for PHP
ea-php71-php-curl.x86_64 : A module for PHP applications that need to interface with curl
ea-php71-php-dba.x86_64 : A database abstraction layer module for PHP applications
ea-php71-php-dbg.x86_64 : The interactive PHP debugger
ea-php71-php-devel.x86_64 : Files needed for building PHP extensions
ea-php71-php-enchant.x86_64 : Enchant spelling extension for PHP applications
ea-php71-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php71-php-fileinfo.x86_64 : A module for PHP applications that need to detect file types
ea-php71-php-fpm.x86_64 : PHP FastCGI Process Manager
ea-php71-php-ftp.x86_64 : A module for PHP applications that need full FTP protocol support
ea-php71-php-gd.x86_64 : A module for PHP applications for using the gd graphics library
ea-php71-php-gettext.x86_64 : A module for PHP applications that need native language support
ea-php71-php-gmp.x86_64 : A module for PHP applications for using the GNU MP library
ea-php71-php-iconv.x86_64 : A module for PHP applications that need to convert character sets
ea-php71-php-imap.x86_64 : A module for PHP applications that use IMAP
ea-php71-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php71-php-ioncube10.x86_64 : Experimental v10 Loader for ionCube-encoded PHP files
ea-php71-php-ldap.x86_64 : A module for PHP applications that use LDAP
ea-php71-php-litespeed.x86_64 : LiteSpeed Web Server PHP support
ea-php71-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
ea-php71-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
ea-php71-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases
ea-php71-php-odbc.x86_64 : A module for PHP applications that use ODBC databases
ea-php71-php-opcache.x86_64 : The Zend OPcache
ea-php71-php-pdo.x86_64 : A database access abstraction module for PHP applications
ea-php71-php-pgsql.x86_64 : A PostgreSQL database module for PHP
ea-php71-php-phalcon.x86_64 : A full-stack PHP framework delivered as a C-extension
ea-php71-php-posix.x86_64 : Modules for PHP scripts that need access to POSIX functions
ea-php71-php-process.x86_64 : Modules for PHP script using system process interfaces
ea-php71-php-pspell.x86_64 : A module for PHP applications for using pspell interfaces
ea-php71-php-recode.x86_64 : A module for PHP applications for using the recode library
ea-php71-php-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices
ea-php71-php-soap.x86_64 : A module for PHP applications that use the SOAP protocol
ea-php71-php-sockets.x86_64 : A module for PHP applications that need low-level access to sockets
ea-php71-php-tidy.x86_64 : Standard PHP module provides tidy library support
ea-php71-php-xml.x86_64 : A module for PHP applications which use XML
ea-php71-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
ea-php71-php-zip.x86_64 : A module for PHP applications that need to handle .zip files
ea-php72.x86_64 : Package that installs PHP 7.2
ea-php72-build.x86_64 : Package shipping basic build configuration
ea-php72-libc-client.x86_64 : UW C-client mail library
ea-php72-libc-client-devel.x86_64 : Development tools for programs which will use the UW IMAP library
ea-php72-libc-client-static.x86_64 : UW IMAP static library
ea-php72-pear.noarch : PHP Extension and Application Repository framework
ea-php72-php.x86_64 : PHP DSO
ea-php72-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
ea-php72-php-bz2.x86_64 : A module for PHP applications that interface with .bz2 files
ea-php72-php-calendar.x86_64 : A module for PHP applications that need date/time calculations
ea-php72-php-cli.x86_64 : Command-line interface for PHP
ea-php72-php-common.x86_64 : Common files for PHP
ea-php72-php-curl.x86_64 : A module for PHP applications that need to interface with curl
ea-php72-php-dba.x86_64 : A database abstraction layer module for PHP applications
ea-php72-php-dbg.x86_64 : The interactive PHP debugger
ea-php72-php-devel.x86_64 : Files needed for building PHP extensions
ea-php72-php-enchant.x86_64 : Enchant spelling extension for PHP applications
ea-php72-php-exif.x86_64 : A module for PHP applications that need to work with image metadata
ea-php72-php-fileinfo.x86_64 : A module for PHP applications that need to detect file types
ea-php72-php-fpm.x86_64 : PHP FastCGI Process Manager
ea-php72-php-ftp.x86_64 : A module for PHP applications that need full FTP protocol support
ea-php72-php-gd.x86_64 : A module for PHP applications for using the gd graphics library
ea-php72-php-gettext.x86_64 : A module for PHP applications that need native language support
ea-php72-php-gmp.x86_64 : A module for PHP applications for using the GNU MP library
ea-php72-php-iconv.x86_64 : A module for PHP applications that need to convert character sets
ea-php72-php-imap.x86_64 : A module for PHP applications that use IMAP
ea-php72-php-intl.x86_64 : Internationalization extension for PHP applications
ea-php72-php-ioncube10.x86_64 : Experimental v10 Loader for ionCube-encoded PHP files
ea-php72-php-ldap.x86_64 : A module for PHP applications that use LDAP
ea-php72-php-litespeed.x86_64 : LiteSpeed Web Server PHP support
ea-php72-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
ea-php72-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases
ea-php72-php-odbc.x86_64 : A module for PHP applications that use ODBC databases
ea-php72-php-opcache.x86_64 : The Zend OPcache
ea-php72-php-pdo.x86_64 : A database access abstraction module for PHP applications
ea-php72-php-pgsql.x86_64 : A PostgreSQL database module for PHP
ea-php72-php-posix.x86_64 : Modules for PHP scripts that need access to POSIX functions
ea-php72-php-process.x86_64 : Modules for PHP script using system process interfaces
ea-php72-php-pspell.x86_64 : A module for PHP applications for using pspell interfaces
ea-php72-php-recode.x86_64 : A module for PHP applications for using the recode library
ea-php72-php-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices
ea-php72-php-soap.x86_64 : A module for PHP applications that use the SOAP protocol
ea-php72-php-sockets.x86_64 : A module for PHP applications that need low-level access to sockets
ea-php72-php-tidy.x86_64 : Standard PHP module provides tidy library support
ea-php72-php-xml.x86_64 : A module for PHP applications which use XML
ea-php72-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
ea-php72-php-zip.x86_64 : A module for PHP applications that need to handle .zip files

  Name and summary matches only, use "search all" for everything.

5 Answers 5

4

Try this:

yum install php73.x86_64 ea-php73-php-intl.x86_64

yum install php73.x86_64 ea-php73-php-soap.x86_64

yum install php73.x86_64 ea-php73-php-zip.x86_64

and so on.

3
  • Brilliant! This worked for me Commented Nov 13, 2020 at 21:43
  • Wow! It workes like a charm Commented Jan 7, 2021 at 16:25
  • Amazing. Saved my time Commented Nov 12, 2021 at 2:19
1

Using yum-config-manager enable the Remi repository as the default repository for installing PHP different version. Following example for enabling Remi repository.


yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum-config-manager --enable remi-php73

Example for Install the PHP 73 with all necessary modules will install while installing PHP 73. The following packages are necessary for PHP 7.3.

yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

0

Give the below command:

yum install php70 php70-mcrypt php70-cli php70-gd php70-curl php70-mysql php70-ldap php70-zip php70-fileinfo

And check

14
  • Hi, I got the response for these packages as the previous attempt. Commented Apr 3, 2018 at 11:46
  • So, have you got these packages installed (using the command I gave in my answer). Remember there is a little change in package name. Commented Apr 3, 2018 at 12:31
  • As I said, the result is the same as when I attempted the same thing: No package [name] available. for each package. Also, running: php -v shows the same version as before, which is 5.6.34. Commented Apr 3, 2018 at 12:38
  • can you post the output of yum search php7 Commented Apr 3, 2018 at 13:06
  • I'll edit the opening question with the result of the search via Yum. I'm not confident to choose which packages to install. Commented Apr 3, 2018 at 13:11
0

In my case the filenames were entirely different

 yum install mod_php73.x86_64  php73-cli.x86_64  php73-common.x86_64  php73-dba.x86_64  php73-dbg.x86_64  php73-devel.x86_64  php73-embedded.x86_64  php73-fpm.x86_64  php73-gd.x86_64  php73-mysqlnd.x86_64  php73-ldap.x86_64  php73-soap.x86_64  

I realized the filenames when I searched

 yum search php7

I was able to successfully install thereafter (I had removed the older version prior to this)

0

To install other versions of PHP follow the steps below in centos 7


Setup Yum Repository First of all, you need to enable Remi and EPEL yum repositories on your system. Use the following command to install EPEL repository on your CentOS and Red Hat 7/6 systems

Use this command to install EPEL yum repository on your system

 sudo yum install epel-release

and now execute one of the following commands as per your operating system version to install the Remi repository.

sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

Install PHP 7 on CentOS Your system is prepared for the PHP installation from yum repositories. Use one of the following commands to install PHP 7.4 or PHP 7.3 or PHP 7.2 or PHP 7.1 on your system based on your requirements.

Install PHP 7.4

yum --enablerepo=remi-php74 install php

Install PHP 7.3

yum --enablerepo=remi-php73 install php

Install PHP 7.2

yum --enablerepo=remi-php72 install php

Install PHP 7.1

yum --enablerepo=remi-php71 install php

I have installed the latest version PHP 7.4 on my system. Now running the following command to check the current active PHP version on my system.

php -v

.

PHP 7.4.1 (cli) (built: Dec 17 2019 16:35:58) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Install PHP Modules You may also need to install additional PHP modules based on your application requirements. The below command will install some more useful PHP modules.

For PHP 7.4

yum --enablerepo=remi-php74 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

For PHP 7.3

yum --enablerepo=remi-php73 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

For PHP 7.2

yum --enablerepo=remi-php72 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

For PHP 7.1

yum --enablerepo=remi-php71 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.