简体   繁体   中英

Install Lua in Linux and implement PHP Lua Extension

I installed Lua via:

apt-get install lua5.3 lua5.3-dev

Then made

pecl install lua

which gave me this error: Please reinstall the lua distribution - lua.h should be in <lua-dir>/include/

But I dunno where this <lua-dir> should be. Following instructions in this question: lua php extension installation via pecl fails did not help

SOLUTION:

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

Add in php.ini:

extension=lua.so

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM