mac libicu-devel安装

php安装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下没找到 libicu-devel ,而找到了 icu4c
brew install icu4c 之后,再次 configure intl 仍然报同样的错误
求解,谢谢诸位

一只萌萌小番薯
浏览 1379回答 2
2回答

湖上湖

安装 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解决方案:brew install icu4c(仅仅安装这个,configure的时候依然报同样的错误)brew link icu4c --forcemake的时候报错 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++11CXXFLAGS_CLEAN = $(CXXFLAGS)重新make,如果修改文件之后,make clean 刚才修改的会被重置 参考:https://stackoverflow.com/que...https://gist.github.com/redef...
打开App,查看更多内容
随时随地看视频慕课网APP