Php ';破坏';未在此范围中声明

Php ';破坏';未在此范围中声明,php,ubuntu,pecl,icu,intl,Php,Ubuntu,Pecl,Icu,Intl,我无法编译php intl(php-5.5.9、ubuntu-14.04、icu-67) 当我尝试pecl install intl时,出现以下错误 In file included from /tmp/pear/temp/intl/intl_convertcpp.cpp:21:0: /tmp/pear/temp/intl/intl_convertcpp.h:28:25: error: 'UnicodeString' was not declared in this scope int int

我无法编译php intl(php-5.5.9、ubuntu-14.04、icu-67)

当我尝试pecl install intl时,出现以下错误

In file included from /tmp/pear/temp/intl/intl_convertcpp.cpp:21:0:
/tmp/pear/temp/intl/intl_convertcpp.h:28:25: error: 'UnicodeString' was not declared in this scope
 int intl_stringFromChar(UnicodeString &ret, char *str, int32_t str_len, UErrorCode *status);
                         ^~~~~~~~~~~~~
/tmp/pear/temp/intl/intl_convertcpp.h:28:25: note: suggested alternative:
In file included from /tmp/pear/temp/intl/intl_convertcpp.h:26:0,
                 from /tmp/pear/temp/intl/intl_convertcpp.cpp:21:
/opt/icu67/include/unicode/unistr.h:294:20: note:   'icu_67::UnicodeString'
 class U_COMMON_API UnicodeString : public Replaceable
                    ^~~~~~~~~~~~~
请告诉我如何克服这个错误


或者以其他方式更新icu数据库,因为apt get将放置一个非常旧的数据库。

使用icu\u 67::UnicodeString而不是UnicodeString,您的问题就解决了