Debian's LuaSocket packages are broken. Then seem to
package the 5.1 version of the library as simply a copy
of the 5.2 version; however, the libraries are incompatible.
Additionally, the package seems to take a number of
different names depending on the version of the distro.
However, the LuaRocks package seems to be fine, so install
that first and then install LuaSocket through LuaRocks.