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

时间:2014-07-28 10:51:22

标签: php linux symfony icu intl

我正在尝试为Symfony 2安装intl PHP扩展。要安装它,我需要提供ICU二进制文件的路径。我已经在我的VM上下载并安装了ICU,但是当我运行Linux配置时,我得到:

检查gettimeofday ...是的 检查U_INLINE的定义是否为C ... 内嵌 检查我们是否有C ++编译器...没有 configure:错误:C ++编译器g ++不起作用或找不到编译器 ./runConfigureICU:./ configure失败

如果我在运行配置时输入帮助,我会得到:

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

选项:-h, - help打印此信息并退出          --enable-debug启用对调试的支持          --disable-release禁用预设优化标志

可以提供以下名称作为平台的参数:

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

我试过Linux,我安装了gcc。为什么说我没有编译器?

我正在关注本教程: http://www.phamviet.net/2013/01/28/php-54-install-php-intl-extension-on-centos-5-with-latest-icu-data/ 安装php intl。

请告知。

谢谢你, 阿德里安

1 个答案:

答案 0 :(得分:0)

经过一番努力浏览,我发现这篇文章: Can't get to install 'intl' extension for php on debian

使用: sudo apt-get install php5-intl

我设法安装ICU libary和php的intl扩展,不需要做任何其他事情虽然我很好,为什么安装它如上所述不起作用。我非常了解nix操作系统,但我不是专家。