简体   繁体   English

未找到ICU编译器或不适用于PHP intl扩展

[英]ICU compiler not found or not working for PHP intl extension

I am trying to install the intl PHP extension for Symfony 2. To install it I need to provide the path to the ICU binaries. 我正在尝试安装Symfony 2的intl PHP扩展。要安装它,我需要提供ICU二进制文件的路径。 I have downloaded and installed ICU on my VM but when I run the configuring for Linux I get: 我已经在我的VM上下载并安装了ICU,但是当我运行Linux的配置时,我得到:

checking for gettimeofday... yes checking for definition of U_INLINE for C... inline checking if we have a C++ compiler... no configure: error: C++ compiler g++ does not work or no compiler found ./runConfigureICU: ./configure failed 检查gettimeofday ...是检查C的U_INLINE定义... 内联检查我们是否有C ++编译器...否配置:错误:C ++编译器g ++不起作用或未找到编译器./runConfigureICU:./configure失败了

If I type in help when running the configuration I get: 如果在运行配置时输入帮助,则会得到:

Usage: runConfigureICU [ -h, --help ] [ --enable-debug | 用法:runConfigureICU [-h,--help] [--enable-debug | --disable-release ] platform [ configurearg ... ] --disable-release]平台[configurearg ...]

Options: -h, --help Print this message and exit --enable-debug Enable support for debugging --disable-release Disable presetting optimization flags 选项:-h,--help打印此消息并退出--enable-debug启用调试支持--disable-release禁用预设优化标志

The following names can be supplied as the argument for platform: 可以提供以下名称作为平台的参数:

AIX                 Use the IBM Visual Age xlc_r/xlC_r compilers on AIX
AIX/GCC             Use the GNU gcc/g++ compilers on AIX
Cygwin              Use the GNU gcc/g++ compilers on Cygwin
Cygwin/MSVC         Use the Microsoft Visual C++ compiler on Cygwin
Cygwin/MSVC2005     Use the Microsoft Visual C++ 2005 compiler on Cygwin
Cygwin/ICL          Use the Intel C++ compiler on Cygwin
FreeBSD             Use the GNU gcc/g++ compilers on Free BSD
HP-UX/ACC           Use the HP ANSI C/Advanced C++ compilers on HP-UX 11
IBMi                Use the iCC compilers on IBM i, i5/OS, OS/400
Linux               Use the GNU gcc/g++ compilers on Linux
Linux/ECC           Use the Intel ECC compiler on Linux
Linux/ICC           Use the Intel ICC compiler on Linux
Linux/VA            Use the IBM Visual Age compiler on Power PC Linux
MacOSX              Use the GNU gcc/g++ compilers on MacOS X (Darwin)
MinGW               Use the GNU gcc/g++ compilers on MinGW
QNX                 Use the QNX QCC compiler on QNX/Neutrino
Solaris             Use the Sun cc/CC compilers on Solaris
Solaris/GCC         Use the GNU gcc/g++ compilers on Solaris
SolarisX86          Use the Sun cc/CC compilers on Solaris x86
TRU64V5.1/CXX       Use the Compaq cxx compiler on Tru64 (OSF)
zOS                 Use the IBM cxx compiler on z/OS (os/390)
zOSV1R2             Use the IBM cxx compiler for z/OS 1.2

I tryed Linux and I have gcc installed. 我尝试过Linux,并且已经安装了gcc。 Why is it saying that I do not have a compiler? 为什么说我没有编译器?

I am following this tutorial: http://www.phamviet.net/2013/01/28/php-54-install-php-intl-extension-on-centos-5-with-latest-icu-data/ to install php intl. 我正在按照本教程进行操作: http : //www.phamviet.net/2013/01/28/php-54-install-php-intl-extension-on-centos-5-with-latest-icu-data/进行安装PHP国际

Please advise. 请指教。

Thank you, Adrian 谢谢阿德里安

After some diligent browsing I found this post: Can't get to install 'intl' extension for php on debian 经过一番努力的浏览后,我发现了这篇文章: 无法在debian上为php安装'intl'扩展名

Using: sudo apt-get install php5-intl 使用:sudo apt-get install php5-intl

I managed to install the ICU libary and the intl extension for php, no need to do anything else although I am curios why installing it as above did not work. 我设法安装了ICU libary和php的intl扩展,尽管我很想知道为什么如上所述安装它不起作用,但是我不需要做任何其他事情。 I know my way around nix operating systems but I am not an expert. 我了解围绕nix操作系统的方式,但我不是专家。

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

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