Blog

PHP: How to install intl extension on CentOS

To install modules on the server, follow below approaches. we have taken example of intl module.

Here are the following steps:

  • Step 1: Find php-intl package
  • Step 2: Find the php version
  • Step 3: Install extension php-intl
  • Step4 : Restart Apache

Step 1: find php-intl package

Run command:- yum list|grep intl
like this
[root@thecoachsmb ~]# yum list|grep intl
Step 2: find the php version
[root@thecoachsmb ~]# php -v

 

Step 3: Install php-intl

Depending upon the php vesion, you have installed. I have 7.4. so my command is as below:

yum install ea-php74-php-intl -y

[root@thecoachsmb ~]# yum install ea-php74-php-intl -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     |  33 kB     00:00
 * base: mirror.wiuwiu.de
 * epel: mirror.wiuwiu.de
 * extras: mirror.wiuwiu.de
 * remi-php71: mirror.23media.de
 * remi-safe: mirror.23media.de
 * updates: mirror.wiuwiu.de
base                                                     | 3.6 kB     00:00
extras                                                   | 3.4 kB     00:00
mariadb                                                  | 2.9 kB     00:00
nginx                                                    | 2.9 kB     00:00
nodesource                                               | 2.5 kB     00:00
remi-php71                                               | 2.9 kB     00:00
remi-safe                                                | 2.9 kB     00:00
updates                                                  | 3.4 kB     00:00
(1/3): remi-php74/primary_db                               | 222 kB   00:00
(2/3): remi-safe/primary_db                                | 1.3 MB   00:00
(3/3): nginx/x86_64/primary_db                             |  35 kB   00:00
Resolving Dependencies
--> Running transaction check
---> Package php74-php-intl.x86_64 0:7.4.22-1.el7.remi will be installed
--> Processing Dependency: php71-php-common(x86-64) = 7.4.22-1.el7.remi for pack
age: php74-php-intl-7.4.22-1.el7.remi.x86_64
--> Running transaction check
---> Package php74-php-common.x86_64 0:7.4.22-1.el7.remi will be installed
--> Processing Dependency: php71-php-json(x86-64) = 7.4.22-1.el7.remi for packag
e: php71-php-common-7.4.22-1.el7.remi.x86_64
--> Processing Dependency: php71-runtime for package: php71-php-common-7.4.22-1.
el7.remi.x86_64
--> Running transaction check
---> Package php71-php-json.x86_64 0:7.4.22-1.el7.remi will be installed
---> Package php71-runtime.x86_64 0:1.0-1.el7.remi will be installed
--> Processing Dependency: scl-utils for package: php71-runtime-1.0-1.el7.remi.x
86_64
--> Processing Dependency: environment-modules for package: php74-runtime-1.0-1.
el7.remi.x86_64
--> Processing Dependency: /usr/sbin/semanage for package: php74-runtime-1.0-1.e
l7.remi.x86_64
--> Running transaction check
---> Package environment-modules.x86_64 0:3.2.10-10.el7 will be installed
--> Processing Dependency: libtcl8.5.so()(64bit) for package: environment-module
s-3.2.10-10.el7.x86_64
---> Package policycoreutils-python.x86_64 0:2.5-22.el7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-2 for package: policycoreutils-
python-2.5-22.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-9 for package: policycoreut
ils-python-2.5-22.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreu
tils-python-2.5-22.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-22
.el7.x86_64
--> Processing Dependency: libselinux-python for package: policycoreutils-python
-2.5-22.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycore
utils-python-2.5-22.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycore
utils-python-2.5-22.el7.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-22.
el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycore
utils-python-2.5-22.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-2
2.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-py
thon-2.5-22.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-py
thon-2.5-22.el7.x86_64
---> Package scl-utils.x86_64 0:20130529-18.el7_4 will be installed
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.1-3.el7_5.1 will be installed
--> Processing Dependency: audit-libs(x86-64) = 2.8.1-3.el7_5.1 for package: aud
it-libs-python-2.8.1-3.el7_5.1.x86_64
---> Package checkpolicy.x86_64 0:2.5-6.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-15.el7 will be installed
---> Package libselinux-python.x86_64 0:2.5-12.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-11.el7 will be installed
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-2.el7 will be installed
---> Package tcl.x86_64 1:8.5.13-8.el7 will be installed
--> Running transaction check
---> Package audit-libs.x86_64 0:2.8.1-3.el7 will be updated
--> Processing Dependency: audit-libs(x86-64) = 2.8.1-3.el7 for package: audit-2
.8.1-3.el7.x86_64
---> Package audit-libs.x86_64 0:2.8.1-3.el7_5.1 will be an update
--> Running transaction check
---> Package audit.x86_64 0:2.8.1-3.el7 will be updated
---> Package audit.x86_64 0:2.8.1-3.el7_5.1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package                   Arch      Version                 Repository    Size
================================================================================
Installing:
 php74-php-intl            x86_64    7.4.22-1.el7.remi       remi-safe    175 k
Installing for dependencies:
 audit-libs-python         x86_64    2.8.1-3.el7_5.1         updates       75 k
 checkpolicy               x86_64    2.5-6.el7               base         294 k
 environment-modules       x86_64    3.2.10-10.el7           base         107 k
 libcgroup                 x86_64    0.41-15.el7             base          65 k
 libselinux-python         x86_64    2.5-12.el7              base         235 k
 libsemanage-python        x86_64    2.5-11.el7              base         112 k
 php71-php-common          x86_64    7.4.22-1.el7.remi       remi-safe    600 k
 php71-php-json            x86_64    7.4.22-1.el7.remi       remi-safe     62 k
 php71-runtime             x86_64    1.0-1.el7.remi          remi-safe    1.1 M
 policycoreutils-python    x86_64    2.5-22.el7              base         454 k
 python-IPy                noarch    0.75-6.el7              base          32 k
 scl-utils                 x86_64    20130529-18.el7_4       base          24 k
 setools-libs              x86_64    3.3.8-2.el7             base         619 k
 tcl                       x86_64    1:8.5.13-8.el7          base         1.9 M
Updating for dependencies:
 audit                     x86_64    2.8.1-3.el7_5.1         updates      247 k
 audit-libs                x86_64    2.8.1-3.el7_5.1         updates       99 k
Transaction Summary
================================================================================
Install  1 Package  (+14 Dependent packages)
Upgrade             (  2 Dependent packages)
Total download size: 6.2 M
Downloading packages:
Not downloading deltainfo for updates, MD is 540 k and rpms are 346 k
(1/17): audit-2.8.1-3.el7_5.1.x86_64.rpm                   | 247 kB   00:00
(2/17): audit-libs-python-2.8.1-3.el7_5.1.x86_64.rpm       |  75 kB   00:00
(3/17): audit-libs-2.8.1-3.el7_5.1.x86_64.rpm              |  99 kB   00:00
(4/17): libcgroup-0.41-15.el7.x86_64.rpm                   |  65 kB   00:00
(5/17): checkpolicy-2.5-6.el7.x86_64.rpm                   | 294 kB   00:00
(6/17): environment-modules-3.2.10-10.el7.x86_64.rpm       | 107 kB   00:00
(7/17): libsemanage-python-2.5-11.el7.x86_64.rpm           | 112 kB   00:00
(8/17): php71-php-common-7.4.22-1.el7.remi.x86_64.rpm      | 600 kB   00:00
(9/17): php71-php-json-7.4.22-1.el7.remi.x86_64.rpm        |  62 kB   00:00
(10/17): libselinux-python-2.5-12.el7.x86_64.rpm           | 235 kB   00:00
(11/17): python-IPy-0.75-6.el7.noarch.rpm                  |  32 kB   00:00
(12/17): scl-utils-20130529-18.el7_4.x86_64.rpm            |  24 kB   00:00
(13/17): php71-runtime-1.0-1.el7.remi.x86_64.rpm           | 1.1 MB   00:00
(14/17): php71-php-intl-7.4.22-1.el7.remi.x86_64.rpm       | 175 kB   00:00
(15/17): setools-libs-3.3.8-2.el7.x86_64.rpm               | 619 kB   00:00
(16/17): policycoreutils-python-2.5-22.el7.x86_64.rpm      | 454 kB   00:00
(17/17): tcl-8.5.13-8.el7.x86_64.rpm                       | 1.9 MB   00:00
--------------------------------------------------------------------------------
Total                                               18 MB/s | 6.2 MB  00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : audit-libs-2.8.1-3.el7_5.1.x86_64                           1/19
  Installing : audit-libs-python-2.8.1-3.el7_5.1.x86_64                    2/19
  Installing : python-IPy-0.75-6.el7.noarch                                3/19
  Installing : checkpolicy-2.5-6.el7.x86_64                                4/19
  Installing : libsemanage-python-2.5-11.el7.x86_64                        5/19
  Installing : libcgroup-0.41-15.el7.x86_64                                6/19
  Installing : setools-libs-3.3.8-2.el7.x86_64                             7/19
  Installing : libselinux-python-2.5-12.el7.x86_64                         8/19
  Installing : policycoreutils-python-2.5-22.el7.x86_64                    9/19
  Installing : 1:tcl-8.5.13-8.el7.x86_64                                  10/19
  Installing : environment-modules-3.2.10-10.el7.x86_64                   11/19
  Installing : scl-utils-20130529-18.el7_4.x86_64                         12/19
  Installing : php71-runtime-1.0-1.el7.remi.x86_64                        13/19
  Installing : php71-php-json-7.4.22-1.el7.remi.x86_64                    14/19
  Installing : php71-php-common-7.4.22-1.el7.remi.x86_64                  15/19
  Installing : php71-php-intl-7.4.22-1.el7.remi.x86_64                    16/19
  Updating   : audit-2.8.1-3.el7_5.1.x86_64                               17/19
  Cleanup    : audit-2.8.1-3.el7.x86_64                                   18/19
  Cleanup    : audit-libs-2.8.1-3.el7.x86_64                              19/19
  Verifying  : scl-utils-20130529-18.el7_4.x86_64                          1/19
  Verifying  : php71-runtime-1.0-1.el7.remi.x86_64                         2/19
  Verifying  : 1:tcl-8.5.13-8.el7.x86_64                                   3/19
  Verifying  : php71-php-intl-7.4.22-1.el7.remi.x86_64                     4/19
  Verifying  : libselinux-python-2.5-12.el7.x86_64                         5/19
  Verifying  : setools-libs-3.3.8-2.el7.x86_64                             6/19
  Verifying  : policycoreutils-python-2.5-22.el7.x86_64                    7/19
  Verifying  : php71-php-json-7.4.22-1.el7.remi.x86_64                     8/19
  Verifying  : libcgroup-0.41-15.el7.x86_64                                9/19
  Verifying  : libsemanage-python-2.5-11.el7.x86_64                       10/19
  Verifying  : environment-modules-3.2.10-10.el7.x86_64                   11/19
  Verifying  : checkpolicy-2.5-6.el7.x86_64                               12/19
  Verifying  : python-IPy-0.75-6.el7.noarch                               13/19
  Verifying  : audit-libs-2.8.1-3.el7_5.1.x86_64                          14/19
  Verifying  : audit-2.8.1-3.el7_5.1.x86_64                               15/19
  Verifying  : php71-php-common-7.4.22-1.el7.remi.x86_64                  16/19
  Verifying  : audit-libs-python-2.8.1-3.el7_5.1.x86_64                   17/19
  Verifying  : audit-libs-2.8.1-3.el7.x86_64                              18/19
  Verifying  : audit-2.8.1-3.el7.x86_64                                   19/19
Installed:
  php71-php-intl.x86_64 0:7.4.22-1.el7.remi
Dependency Installed:
  audit-libs-python.x86_64 0:2.8.1-3.el7_5.1
  checkpolicy.x86_64 0:2.5-6.el7
  environment-modules.x86_64 0:3.2.10-10.el7
  libcgroup.x86_64 0:0.41-15.el7
  libselinux-python.x86_64 0:2.5-12.el7
  libsemanage-python.x86_64 0:2.5-11.el7
  php74-php-common.x86_64 0:7.4.22-1.el7.remi
  php74-php-json.x86_64 0:7.4.22-1.el7.remi
  php74-runtime.x86_64 0:1.0-1.el7.remi
  policycoreutils-python.x86_64 0:2.5-22.el7
  python-IPy.noarch 0:0.75-6.el7
  scl-utils.x86_64 0:20130529-18.el7_4
  setools-libs.x86_64 0:3.3.8-2.el7
  tcl.x86_64 1:8.5.13-8.el7
Dependency Updated:
  audit.x86_64 0:2.8.1-3.el7_5.1       audit-libs.x86_64 0:2.8.1-3.el7_5.1
Complete!

Step 4: Restart Apache

/bin/systemctl restart httpd.service

That’s it !!

In this way, you can install other extensions on Centos as well.

Happy Learning !!

Thank you !!

Leave a Reply

Your email address will not be published. Required fields are marked *

🚀 Let’s Connect on LinkedIn! 🚀

Want to level up your skills and knowledge? 🚀
Follow us on LinkedIn to get:
✅ Expert insights on business growth
✅ Daily tips to sharpen your skills
✅ Exclusive updates from The Coach SMB

Let's grow together!