php安装intl扩展的时候报错:configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config worksCentOS下直接执行 yum -y install libicu-devel 即可然而 Mac下没找到 libicu-devel ,而找到了 icu4cbrew install icu4c 之后,再次 configure intl 仍然报同样的错误求解,谢谢诸位
2 回答
湖上湖
TA贡献2003条经验 获得超2个赞
安装 intl 扩展报错:
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works
CentOS解决方案:yum -y install libicu-devel
接着继续安装
mac解决方案:
brew install icu4c(仅仅安装这个,configure的时候依然报同样的错误)
brew link icu4c --force
make的时候报错
In file included from ./intl_convertcpp.h:26:
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3025:7: error: delegating constructors are permitted only in C++11
UnicodeString(ConstChar16Ptr(text)) {}
^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3087:7: error: delegating constructors are permitted only in C++11
UnicodeString(ConstChar16Ptr(text), length) {}
^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3180:7: error: delegating constructors are permitted only in C++11
UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
···
make: *** [intl_convertcpp.lo] Error 1
解决方案:
打开 /Applications/NMP/src/php-7.1.3/ext/intl/Makefile
搜索 CXXFLAGS = -g -O2 行并添加 -std = c ++ 11
CXX = g++
CXXFLAGS = -g -O2 -std=c++11
CXXFLAGS_CLEAN = $(CXXFLAGS)
重新make,如果修改文件之后,make clean 刚才修改的会被重置
参考:
https://stackoverflow.com/que...
https://gist.github.com/redef...
- 2 回答
- 0 关注
- 1378 浏览
添加回答
举报
0/150
提交
取消