intl扩展 mac 安装php,macOS Sierra安装PHP Extension intl

I am trying to get magento 2.x to run on my machine. I am using xampp 5.6 with the same php version and running a virtual apache server.

As seen in this screenshot ef42eaa0017eeee661042472932f7c7b.png

The PHP Extension intl. is missing.

I was researching on how it can be added / activated.

I tried uncommenting the extension in the php.ini of xampp but it still appears as missing.

I tried to follow this guide, but when I try to install intl with

sudo pecl install intl

it fails with

2 warnings and 1 error generated.

make: *** [php_intl.lo] Error 1

ERROR: `make' failed

解决方案

You have to provide the intl.so file which doesn't come with XAMPP.

To fix this you just have to follow the steps below.

Get the intl.so file (explained below)

Copy the intl.so file to /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-[some date]/

Add a new line extension=intl.so to the end of your php.ini which is usually located at /Applications/XAMPP/xamppfiles/etc/php.ini

Restart Apache Server

Only the first step is different for different users.

You have to get the correct intl.so file.

if you have php 7.0 run brew install php70-intl

other versions must be php71-intl or php56-intl.

Your intl.so can be found in /usr/local/Cellar/php70-intl/[version]/intl.so

It should be similar for different php versions.

To copy it : open your terminal

cd /usr/local/Cellar/php70-intl/[version]/

cp intl.so /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-[some date]/

Now add your entry to the php ini file and restart Apache.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值