简体   繁体   English

在Ubuntu 10.04上安装最新的php_intl

[英]Install latest php_intl on Ubuntu 10.04

I'm using the Ondřej Surý source for the latest php Version on Ubuntu 10.04. 我正在使用OndřejSurý源代码来获取Ubuntu 10.04上的最新PHP版本。 So i get PHP Version 5.4.12-1~lucid+1 所以我得到PHP版本5.4.12-1~lucid + 1

For my Symfony2 applciation I need the latest version of the php-intl extension. 对于我的Symfony2应用程序,我需要最新版本的php-intl扩展。

On my local XAMPP Server I am running 在我的本地XAMPP服务器上,我正在运行

  • INTL version 1.1.0 INTL版本1.1.0
  • ICU version 4.6.1 ICU版本4.6.1

On my webserver is only this one: 在我的网络服务器上只有这一个:

  • INTL version 1.1.0 INTL版本1.1.0
  • ICU version 4.2.1 ICU版本4.2.1

Is there a source or a way to update it too ? 是否有来源或方法来更新它?

You will have to compile a more recent version of ICU from source and then recompile the PHP intl extension. 您必须从源代码编译更新版本的ICU,然后重新编译PHP intl扩展。

Building ICU from source is pretty standard (configure, make, sudo make install). 从源代码构建ICU非常标准(configure,make,sudo make install)。 You can pass --prefix to configure to select the installation location. 您可以通过--prefix配置以选择安装位置。

The easiest way to recompile the PHP intl extension is to remove the one you currently have ( apt-get remove php5-intl ) and install the PECL version ( pecl install intl ). 重新编译PHP intl扩展的最简单方法是删除当前的扩展( apt-get remove php5-intl )并安装PECL版本( pecl install intl )。 You will be asked for the location of the ICU files. 系统将要求您提供ICU文件的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM