Can't get to install 'intl' extension for php on debian

后端 未结 5 1995
南方客
南方客 2020-12-25 13:11

I have a Debian server and I want to install the intl extension through pecl.

During the installation it asks me:

"

相关标签:
5条回答
  • 2020-12-25 13:13

    You need to install libicu44 and libicu-dev:

    apt-get install libicu44 libicu-dev
    

    and after this you can install intl with pecl:

    ./pecl install intl
    

    Note if using Ubuntu:

    It lLooks like the first package libicu44 is not available, in which case just install libicu-dev and it will go through the dependencies and handle it for you. Seems to use libicu42 at the moment.

    0 讨论(0)
  • 2020-12-25 13:14

    On Ubuntu 12.04 LTS, the following worked for me:

    sudo apt-get install php5-intl
    sudo /etc/init.d/apache2 restart
    

    Bam, warning gone! Hope this helps somebody in the future :)

    0 讨论(0)
  • 2020-12-25 13:21

    Same error:

    /tmp/pear/temp/intl/collator/collator_class.c:92: error: duplicate 'static'
    

    But when reading the intl native extension comments, I saw:

    Debian Squeeze users can install the intl extension with:

    sudo apt-get install php5-intl

    first comment

    The package works even with my old Ubuntu 8.04...

    0 讨论(0)
  • 2020-12-25 13:24

    Installing g++ sudo apt-get install g++ before sudo ./pecl install intl did the trick for me.

    0 讨论(0)
  • 2020-12-25 13:38

    I knew this sounded familiar; I had the same problem back in May 2008, discussed here: http://old.nabble.com/ubuntu-7.10-pecl-install-intl-p17140873.html

    Ed Batutis explained that "/usr" is the correct answer if you have icu-config at "/usr/bin/icu-config"; adjust accordingly if it is somewhere else.

    However that didn't help for me. I described the solution for me here: http://darrendev.blogspot.com/2008/05/install-php-pecl-intl-module-for-ubuntu.html ...which was basically to define the PHP_SETUP_ICU macro. That was supposed to be added in 5.2.4, so as you are using php 5.3 your problem ought to be something else.

    0 讨论(0)
提交回复
热议问题