Installing lua5.2 vs. lua5.3 on Ubuntu 16.10

Solution 1:

This is still an issue in 18.04 Bionic. Workaround:

sudo update-alternatives --install /usr/bin/lua lua-interpreter \
/usr/bin/lua5.3 130 --slave /usr/share/man/man1/lua.1.gz \
lua-manual /usr/share/man/man1/lua5.3.1.gz

sudo update-alternatives --install /usr/bin/luac lua-compiler \
/usr/bin/luac5.3 130 --slave /usr/share/man/man1/luac.1.gz \
lua-compiler-manual /usr/share/man/man1/luac5.3.1.gz

Solution 2:

Because the package maintainer didn't provide the alternatives infrastructure. Unfortunately no way around it but to set it up manually or just plain symlink /usr/bin/lua to /usr/bin/lua5.3.

I've submitted a bug report: https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212