问题
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 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
回答1:
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.
来源:https://stackoverflow.com/questions/43014111/macos-sierra-installing-php-extension-intl