Install intl PHP extension OSX High Sierra

前端 未结 12 997
予麋鹿
予麋鹿 2020-12-01 04:39

How can I install intl PHP extension in PHP 7.1.7, which is delivered with osx high sierra?

12条回答
  •  有刺的猬
    2020-12-01 05:01

    try this on Mac

    php -v
    sudo port install php7*-intl
    

    More information

    You can find port packages by this page https://www.macports.org/ports.php?by=name&substr=intl

    And you can install port through these steps: https://guide.macports.org/chunked/installing.macports.html

    curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.5.4.tar.bz2
    tar xf MacPorts-2.5.4.tar.bz2
    cd MacPorts-2.5.4/
    ./configure
    make
    sudo make install
    

    And change ~/.bash_profile

    export PATH=/opt/local/bin:/opt/local/sbin:$PATH
    

    If there is error, check following steps:

    check port

    sudo port list
    sudo port selfupdate
    sudo port search --name --glob 'php*'
    sudo port install php**-intl
    

    This page has more info about port usage: https://guide.macports.org/chunked/using.html

提交回复
热议问题