php - 在Linux中安装Lua并实现PHP Lua Extension
问题描述
我通过以下方式安装了 Lua:
apt-get install lua5.3 lua5.3-dev
然后做了
pecl install lua
这给了我这个错误:Please reinstall the lua distribution - lua.h should be in <lua-dir>/include/
但我不知道这<lua-dir>
应该在哪里。遵循这个问题中的说明:
lua php extension installation via pecl failed
didn't help
解决方案
解决方案:
pecl download lua
cd lua-2.0.7
phpize
./configure --with-lua-version=5.3
make
cp modules/lua.so /usr/lib/php/20151012/lua.so
在 php.ini 中添加:
extension=lua.so
推荐阅读
- deep-learning - 在 FasterRCNN 中,为什么短边尺寸为 600,最大尺寸为 1000?
- java - 在 Embedded Jetty 中与 Restful 一起部署网页
- angular - PrimeNg turbotable 过滤器不适用于行组
- mysql - 如何找到最接近的值并将其与记录合并?
- html - 调整大小时画布游戏不适合父 div
- javascript - 基于选项值选择问题的 Javascript 重定向
- java - JLabel 旁边的 JTextField
- python-3.x - mypy 和 sqlalchemy:错误:未定义名称“sqlalchemy”
- r - 如何根据因素为 PCA 结果着色?
- push-notification - CAA 未知按钮通知