No releases available for package "pecl.php.net/intl" - php

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!

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! =)

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

Related

Trying to install int extension macOS Catalina and PHP 7.4.10

I am trying to install the zip and the intl extension for PHP 7.4.10
I run
sudo pecl install intl
and then the installation is requesting :
Specify where ICU libraries and headers can be found [DEFAULT] :
then I hit enter and continues but then it shows the next error:
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:
No package 'icu-uc' found
No package 'icu-io' found
No package 'icu-i18n' found
then I start to look how to install icu, I run:
brew install icu4c
the console shows:
If you need to have icu4c first in your PATH run:
echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> /Users/user/.bash_profile
echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> /Users/user/.bash_profile
For compilers to find icu4c you may need to set:
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
export CPPFLAGS="-I/usr/local/opt/icu4c/include"
For pkg-config to find icu4c you may need to set:
export .bash_profile="/usr/local/opt/icu4c/lib/pkgconfig"
I added all the paths to the .bash_profile config file and run:
source .bash_profile
at this point I am not sure what todo I am still receiving:
== Environment ==
!! php_extension zip !!
[System] must be installed and enabled - The Zip PHP extension is now required by Moodle, info-ZIP binaries or
PclZip library are not used anymore.
!! php_extension intl !!
[System] must be installed and enabled - Intl extension is required to improve internationalization support, such as
locale aware sorting and international domain names.
even after run sudo apachectl restart
also I have check a lot of guides to install the zip extension via php.ini adding extension=zip but is not working
any help will be appreciated
[UPDATE]I tried to use the fist answer to the post and I got after run all and the last command output was sudo pecl update-channels && sudo pecl install intl
checking for icu-uc >= 50.1 icu-io icu-i18n... no
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:
No package 'icu-uc' found
No package 'icu-io' found
No package 'icu-i18n' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: `/private/tmp/pear/temp/intl/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-icu-dir=/usr/local/opt/icu4c' failed
Is icu4c present on your system ? What is the output of:
which icu4c
If you have no output we can investigate further. A quick look at the ICU documentation tell us that the library relies on autoconf.
brew update
brew install autoconf automake libtool
brew install icu4c
Now let's check if icu4c is installed properly
which icu4c
If at this point you still have no output then it's better to install and compile icu4c from source.Because this library installed via Homebrew could be suffering from multiple issues.
wget https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-src.tgz
tar xvfz icu4c-67_1-src.tgz
cd icu/source
./configure --prefix=/usr/local/opt/icu4c/67_1 --enable-icu-config
sudo make && sudo make install
Afterwards you can resume
sudo pecl update-channels && sudo pecl install intl
If you will be asked
Specify where ICU libraries and headers can be found [DEFAULT] :
The answer is
/usr/local/opt/icu4c
When icu4c is installed with brew, it doesn't copy its files to pkg-config configuration directory.
So, another workaround would be to be to set the PKG_CONFIG_PATH to the folder where the lib is located. Example:
PKG_CONFIG_PATH=/usr/local/Cellar/icu4c/69.1/lib/pkgconfig/ pkg-config --cflags --libs libsoup-2.4

Can't install php Intl extension on MacosX

I'm following this link to install this PHP extension but I'm stuck in the middle.
When I try to run this command pecl install intl I get this message:
Specify where ICU libraries and headers can be found [DEFAULT] :
And I don't know where the ICU libraries are located.
If I press Enter I get this error:
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
ERROR: `/private/tmp/pear/install/intl/configure --with-php-config=/usr/bin/php-config --with-icu-dir=DEFAULT' failed
How can I locate the correct path of ICU libraries ?
I'm using High Sierra and MAMP with PHP version 7.1
ICU stands for ICU - International Components for Unicode
Install it with brew
brew update
brew search icu # returns 'icu4c'
brew install icu4c
OR
Install it with pecl
sudo pecl update-channels
sudo pecl install intl
installing intl package on osx
EDIT: after a better look in php#5.6 it seems that it is already compiled with 'intl'
php -i | grep intl
... '--enable-intl' ...
So my answer is normally useless for php#5.6 (but can be useful in some cases I guess)
I'm facing the same issue today trying to switch from php56 to php#5.6.
After lot of digging, here is the workaround.
Make sure to have a clean install of php#5.6 and to have it at the current version
php -v
PHP 5.6.35 (cli) (built: Mar 31 2018 20:21:31)
Make also sure to have icu4c
brew update
brew install icu4c
Next, we will install and compile intl manually
cd /usr/local/src/
wget https://pecl.php.net/get/intl-3.0.0.tg
tar zxf intl-3.0.0.tgz
cd intl-3.0.0/
phpize --clean
phpize
./configure
And here is the trick, edit Makefile
vi Makefile
Modify the line CXXFLAGS as follow
CXXFLAGS = -g -O2 -std=c++11
AND the line CPPFLAGS as follow
CPPFLAGS = -DHAVE_CONFIG_H -DU_USING_ICU_NAMESPACE=1
Next, save, and compile
make
make install
And voila
Installing shared extensions: /usr/local/Cellar/php#5.6/5.6.35/pecl/20131226/
Don't forget to add extension="intl.so" to your php.ini
vi /usr/local/etc/php/5.6/php.ini
(and to restart apache)
Sources:
https://gist.github.com/redefinelab/4188331
https://github.com/Homebrew/homebrew-php/commit/d7a3e0b6487780e0d983b35b8f42aad0fd01bf78
download the version of PHP you use in XAMPP from php.net. I am using 7.3. This version worked for me: php-7.3,
I’m guessing if you follow the steps it might work for 7.0 or 7.2 as well.
Extract the tar.gz file using (I extracted it inside ~/Downloads/ folder )
tar -xzvf php-7.1.31.tar.gz
cd into the extracted folder
cd php-7.1.31
change to subfolder ext/intl
cd ext/intl/
Run these commands to build the extension
/Applications/XAMPP/bin/phpize
./configure --enable-intl --with-php-config=/Applications/XAMPP/bin/php-config --with-icu-dir=/Applications/XAMPP/xamppfiles/
make
sudo make install
you can now delete all files you downloaded and also the extracted folders.
Open /Applications/XAMPP/xamppfiles/etc/php.ini , and add extension=intl.so
That’s it! Restart your Apache using XAMPP GUI and it should work. You have to run these commands each time you install a new version of XAMPP.

Pecl install sqlsrv returns No releases available for package

While installing sqlsrv module for PHP7 i'm getting following error -
No releases available for package "pecl.php.net/sqlsrv
Command used
sudo pecl install sqlsrv
Any idea how to resolve this issue?
Same problem here... Solved installing modules as root this way (Ubuntu 16.04):
wget http://pecl.php.net/get/sqlsrv-4.3.0.tgz
pear install sqlsrv-4.3.0.tgz
wget http://pecl.php.net/get/pdo_sqlsrv-4.3.0.tgz
pear install pdo_sqlsrv-4.3.0.tgz
You can check latests available versions here: http://pecl.php.net/package-search.php?pkg_name=sqlsrv&bool=AND&submit=Search
And check if php modules are enabled after installation:
php -m | grep sqlsrv
Try to install a certain version that you know exists:
$ pecl install sqlsrv-4.3.0
Also try to clear the cache:
$ pear clear-cache
For corporate proxy users, you might just need to tell pear to use your proxy.
pear config-set http_proxy http://proxy.example.com:8080
Sometimes pecl.php.net is not available or down. In this case pecl install may show "no releases available".
Just for information.

Unable to install php solr extension

Using pecl install -n solr gives
No releases available for package "pecl.php.net/solr"
install failed
Also tried pear install pecl/solr which gives the same output :
No releases available for package "pecl.php.net/solr"
install failed
I'm using a Mac and php56.
Output of pecl -V
PEAR Version: 1.9.4
PHP Version: 5.6.25
Zend Engine Version: 2.6.0
Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016;
root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
Another important piece of information is that, pear and pecl were not available in my system, so I installed them using
sudo php /usr/lib/php/install-pear-nozlib.phar -d /usr/local/lib/php -b /usr/local/bin
Update
Tried sudo pecl install -n solr and now it seems to go one step further
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: phpize failed
Luckily stumbled upon
PEAR package install fails
which led to execute
pear list-upgrades which showed some kind of permission issue with cache directory, manually created the directory using sudo at the specified location (/private/tmp/pear/cache)
And then used sudo to install the solr extension as sudo pecl install -n solr which threw the following error :
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
brew install autoconf followed by sudo pecl install solr worked.

How to install V8js on PHP5.5?

I want to install the v8js extension for PHP5.5 on Ubuntu 12.04 but can't make it working.
When I try to install the v8js extension version 0.2.0 (latest) with PECL, I have this message:
configure: error: libv8 must be version 3.24.6 or greater
ERROR: `/tmp/pear/temp/v8js/configure --with-v8js' failed
If I try to install an old version, I have a compilation error. This message is very similar to my issue: Install v8js for php on ubuntu
How can I fix this issue?
EDIT: I couldn't install it on Ubuntu 14.04 with PHP5.5, even with a PHP downgrade with PHPbrew to PHP 5.4. However, using Ubuntu 12.04 with PHP 5.4 works great. I didn't try the downgrade from PHP 5.5 to 5.4 on Ubuntu 12.04.
in case you can't find libv8-dev or libv8-dbg, you can find the correct version by run command
~$ apt-cache search libv8
libv8-3.14-dbg - V8 JavaScript engine - debugging symbols
libv8-3.14-dev - V8 JavaScript engine - development files for 3.14 branch
libv8-3.14.5 - V8 JavaScript engine - runtime library
libv8-dev - V8 JavaScript engine - development files for latest branch
then you can run
~$ sudo apt-get install libv8-3.14-dev libv8-3.14-dbg g++ cpp
then you can try to install v8js via pecl by running
~$ sudo pecl install v8js-0.2.0
if that command return error like this
configure: error: libv8 must be version 3.24.6 or greater
ERROR: `/tmp/pear/temp/v8js/configure --with-v8js' failed
you can try to install v8js-0.1.3 instead by running
~$ sudo pecl install v8js-0.1.3
then edit your php.ini to add v8js extension
~$ echo "extension=v8js.so" >> /etc/php5/cli/php.ini
Open your terminal/console
sudo apt-get install libv8-dev libv8-dbg g++ cpp
Make an update sudo apt-get update
Try sudo pecl install v8js-0.2.0 (or other version i.e.: sudo pecl install v8js-0.1.3)
Edit your php.ini (Check: Where is my php.ini file?) file by adding: extension=v8js.so.
Restart server
If it the extension still doesn't work, try to edit /etc/php5/conf.d/v8js.ini and add extension=v8js.so and restart server again.
Hope this helps.
These other answers work well and I used v8js-0.1.3 for the past 1.5 years but after needing to upgrade to PHP 7 I needed a better solution as v0.1.3 doesn't compile with PHP 7 (something to do with php_smart_str being renamed to php_smart_string).
After a couple hours of frustrating research and compiling libv8 myself, I didn't want to have to go through this whole process on every server I provisioned.
Anyway, I found this site which points you to a launchpad PPA site that provides a couple different ubuntu packages with the 5.1 and 5.2 libv8 libraries.
I ran these commands (please don't add repositories of 3rd party devs without understanding the risks).
sudo apt-add-repository ppa:pinepain/libv8-5.2
sudo apt-get update
sudo apt-get install libv8-5.2-dev
sudo pecl install v8js-1.1.0
(Thanks #JeyKeu for suggesting to add "apt-get update" to these commands)
I couldn't get v8js-1.3.0 or 1.2.0 to build, but 1.1.0 worked well. I checked the changelog and found that the latest updates are not necessary in my circumstance anyway.

Categories