通过pecl的lua php扩展安装失败 [英] lua php extension installation via pecl fails
问题描述
MacOS High Sierra
MacOS High Sierra
php 7.1
pecl install lua(失败,出现以下错误)
pecl install lua (fails with the following error)
错误:
正在检查默认路径中的lua ...未找到配置:错误:请重新安装lua发行版-lua.h应该在/include/中错误:`/private/tmp/pear/temp/lua/configure --with-php-config=/usr/local/opt/php@7.1/bin/php-config' 失败
checking for lua in default path... not found configure: error: Please reinstall the lua distribution - lua.h should be in /include/ ERROR: `/private/tmp/pear/temp/lua/configure --with-php-config=/usr/local/opt/php@7.1/bin/php-config' failed
推荐答案
解决方案:
pecl下载lua
pecl download lua
tar xvzf lua-2.0.4.tgz
tar xvzf lua-2.0.4.tgz
cd lua-2.0.4
cd lua-2.0.4
phpize
编辑配置"脚本,找到声明lib路径的行(搜索"/usr/lib64 ..."),添加"/usr/local/lib"路径,继续安装
EDIT "configure" script, find line where lib paths are declared (search for "/usr/lib64 ..." ), add "/usr/local/lib" path, proceed with installation
./configure
./configure
制作
进行安装
将"lua.so"的路径添加到您的php.ini文件中
add path to "lua.so" to your php.ini file
这篇关于通过pecl的lua php扩展安装失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!