No releases available for package “pecl.php.net/intl”

試著忘記壹切 提交于 2019-12-31 04:20:08

问题


I'm trying to install intl for php. When I'm running sudo pecl install intl it gives me an error No releases available for package "pecl.php.net/intl". I have tried to clear cache and also I tried to upgrade pear and pecl. Nothing. Here my pear and php versions:

PEAR Version: 1.9.4 PHP Version: 5.6.3 Zend Engine Version: 2.6.0 Running on: Darwin iMac-bvc.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64

Any ideas? Thanks in advance!


回答1:


To get it off the unanswered list:


Well, problem solved!

If you can't install intl by pecl you can just download from pecl.php.net the package which you need (in my case it was intl-3.0.0.tgz).

Then install it by pear like that:

$ sudo pear install intl-3.0.0.tgz

After you have to add extension="intl.so" inside php.ini and then restart apache.

If you want to check whether intl has installed or not you can use this command:

$ php -m | grep intl

If result is intl then you did it! =)




回答2:


Please follow below steps:

  1. Try this under mac brew install homebrew/php/php70-intl
  2. Then open php.ini (you can use which php to help you).
  3. Add, extension = /usr/local/Cellar/php70-intl/7.0.25_20/intl.so
  4. And then use php -m | grep intl
  5. If it works, the intl will be displayed.


来源:https://stackoverflow.com/questions/35953764/no-releases-available-for-package-pecl-php-net-intl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!