1.CentOS 7 yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-15.ius.centos7.noarch.rpm yum -y update 2.安装所有必须的扩展: yum -y install php72u-intl 如果出现yum-errors: [Errno 14] HTTP Error 404: Not Found 点击 https://wiki.centos.org/yum-errors 3.查找intl.so的位置 find / -name intl.so 4.sudo cp /usr/lib64/php/modules/intl.so /etc/php/7.2.11/lib/php/extensions/no-debug-non-zts-20170718/ 5.修改php.ini ,去掉注释 extension=intl 6.systemctl restart nginx/php-fpm 7.php -m查看扩展是否开启