Fatal error lua h no such file or directory

I'm trying to install S4 on Ubuntu (15.10) and after ./configure went well, I get the following error when using make: main.c:31:17: fatal error: lua.h: No such file or directory #include <l...

@Gia91

I’m trying to install S4 on Ubuntu (15.10) and after ./configure went well, I get the following error when using make:

main.c:31:17: fatal error: lua.h: No such file or directory
#include <lua.h>
^
compilation terminated.
Makefile:674: recipe for target ‘S4-main.o’ failed
make[1]: *** [S4-main.o] Error 1
make[1]: Leaving directory ‘/home/giampaolo/Desktop/S4-1.0.0/src’
Makefile:212: recipe for target ‘check-recursive’ failed
make: *** [check-recursive] Error 1

am I missing a lua.h file in the src folder? I have install lua and I think I have all the needed libraries.

@Gia91
Gia91

changed the title
lua.h file missin

lua.h file missing

Jan 17, 2017

@myungjoon

Did you install lua and luadev?
For my case,
$sudo find / -name «lua.h»
/usr/include/lua5.2/lua.h

try
$ sudo apt-get install lua5.2
$ sudo apt-get install liblua5.2-dev

or see this post

gaoxiang9457, Costallat, MaartenW, Nexter73, stleon, bananabrann, acarl005, kingzevin, corndog2000, akshaychauhannykaa, and 3 more reacted with thumbs up emoji

@ghost

had the same issue on fedora 26/ korora26. needed to install these:
lua-devel.x86_64
luajit-devel.x86_64
compat-lua-devel.x86_64
lua-socket-devel.x86_64
so just run dnf or yum to install them:
yum install lua-devel.x86_64 luajit-devel.x86_64 compat-lua-devel.x86_64 lua-socket-devel.x86_64
dnf install lua-devel.x86_64 luajit-devel.x86_64 compat-lua-devel.x86_64 lua-socket-devel.x86_64

@dev-kxmn

For some reason I had been this same issue with lsqlite 0.9.5-1
The liblua5.3-dev was installed as I saw with locate lua.h. The default /usr/bin/lua -v shown correctly version 5.3.3 But I had other lua versions installed to.

I just uninstalled lua5.1 and lua5.2 and tried to run luarocks install lsqlite3 again and just work fine. May be some conflict searching for the correct lua.h version

@cgohearn

Hello,

I am having the same issue of «no such file or directory» for the lua.h file.

@myungjoon

Did you install lua and luadev?
For my case,
$sudo find / -name «lua.h»
/usr/include/lua5.2/lua.h

try
$ sudo apt-get install lua5.2
$ sudo apt-get install liblua5.2-dev

or see this post

I definitely have lua and the luadev install and followed the instructions in myungjoon’s Issue #45 reply. I am using Windows Subsystem for Linux on Windows 10.

I tried installed LuaJIT and luasocket. I was able to make LuaJIT, but when trying to make luasocket the same «fatal error: lua.h: No such file or directory» flew up.

I would greatly appreciate any help or suggestions. It seems like a missing lua.h file is a common issue, but I can’t figure it out.

Thank you!

@kwrobert

Did you make sure the include path in the Makefile contains the path to your lua header files? That path changes per Linux distro, so it might be pointing to the wrong place in the Makefile

Sent from my iPhone

On Jun 12, 2020, at 12:39 AM, cgohearn ***@***.***> wrote:


Hello,

I am having the same issue of «no such file or directory» for the lua.h file.

@myungjoon

Did you install lua and luadev?
For my case,
$sudo find / -name «lua.h»
/usr/include/lua5.2/lua.h

try
$ sudo apt-get install lua5.2
$ sudo apt-get install liblua5.2-dev

or see this post

I definitely have lua and the luadev install and followed the instructions in myungjoon’s Issue #45 reply. I am using Windows Subsystem for Linux on Windows 10.

I tried installed LuaJIT and luasocket. I was able to make LuaJIT, but when trying to make luasocket the same «fatal error: lua.h: No such file or directory» flew up.

I would greatly appreciate any help or suggestions. It seems like a missing lua.h file is a common issue, but I can’t figure it out.

Thank you!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

ewdpb


  • #1

Hi all,

I am trying to install LUA packet through luarocks but it complains about not finding lua.h:

—————————————————————————————————————————————————————————————
myself@myhost:~# sudo luarocks install http
Installing https://luarocks.org/http-0.3-0.src.rock
Missing dependencies for http 0.3-0:
compat53 >= 0.3 (not installed)
cqueues >= 20161214 (not installed)
luaossl >= 20161208 (not installed)
basexx >= 0.2.0 (not installed)
lpeg (not installed)
lpeg_patterns >= 0.5 (not installed)
binaryheap >= 0.3 (not installed)
fifo (not installed)

http 0.3-0 depends on compat53 >= 0.3 (not installed)
Installing https://luarocks.org/compat53-0.7-1.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.3 -c lutf8lib.c -o lutf8lib.o
In file included from lprefix.h:46,
from lutf8lib.c:10:
c-api/compat-5.3.h:10:10: fatal error: lua.h: No such file or directory
#include <lua.h>
^~~~~~~
compilation terminated.

Error: Failed installing dependency: https://luarocks.org/compat53-0.7-1.src.rock — Build error: Failed compiling object lutf8lib.o

—————————————————————————————————————————————————————————————

lua.h is actually there:

myself@myhost::~# sudo find / -name lua.h
/usr/include/lua5.1/lua.h

But I guess it is not in the expected location. Anyone has any idea where I should look next?

Thanks!

  • #2

You did a pretty poor job of installing luarocks.
I’ve never heard of it, but simply going to their build instructions reveals:

Code:

Run ./configure. (This will attempt to detect your installation of Lua.
If you get any error messages, see the section "Customizing your settings", below.)

And natuarally, I got this error:

Code:

root@host:/dirs/luarocks-3.2.1# ./configure

Configuring LuaRocks version 3.2.1...

Lua interpreter not found in $PATH
You may want to use the flags --with-lua, --with-lua-bin and/or --lua-version
Run ./configure --help for details.

configure failed.

This would explain why your install of http throws a lua.h critical error.

Following the build instructions leads you to a series of flags you can use to specify Lua version, include directories, etc.

According to these outdated Freeswitch instructions for luarocks, it is suggested to install a Lua binary through the package manager.
I decided on apt install lua5.1, as you rightly demonstrated, the lua.h is inside a lua5.1 directory (probably what version freeswitch-mod-lua is at)

Finally, with Lua installed and an include path passed (again, as you pointed out), I ran and got:

Code:

root@host:/dirs/luarocks-3.2.1# ./configure --with-lua-include="/usr/include/lua5.1/"

Configuring LuaRocks version 3.2.1...

Lua version detected: 5.1
Lua interpreter found: /usr/bin/lua5.1
lua.h found: /usr/include/lua5.1/lua.h
unzip found in PATH: /usr/bin

Done configuring.

LuaRocks will be installed at......: /usr/local
LuaRocks will install rocks at.....: /usr/local
LuaRocks configuration directory...: /usr/local/etc/luarocks
Using Lua from.....................: /usr

* Type make and make install:
  to install to /usr/local as usual.
* Type make bootstrap:
  to install LuaRocks into /usr/local as a rock.

Allowing me to run make build and make install

* NOTE 1 — I had to do apt install libssl-dev to get luarocks to install http
* NOTE 2- I have never used luarocks or any lua package, so I can’t help onwards — at least lua rocks is installed
* NOTE 3 — you could likely skip most of the manual install and use the upstream repo build of luarocks if you work out how to include "/usr/include/lua5.1/" in the config file /etc/luarocks/config.lua

Last edited: Dec 31, 2019

ewdpb


  • #3

Thanks very much @JamesBorne for taking the time. To be honest I did not want to mess around too much with different packages for I have found that fusionpbx is quite moody. I did not want to break anything. I am about to test on a clean box, It should all go well. Thanks again!

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Specialised Support
  • Gaming & Leisure
  • lupa/_lupa.c:218: fatal error: lua.h: No such file or directory compilation terminate

  1. lupa/_lupa.c:218: fatal error: lua.h: No such file or directory compilation terminate

    Whenever I try to install openblox I get this error, Does anyone here have ideas for solutions? Their forum is always empty.

    Code:

    running install
    install_dir /usr/local/lib/python2.6/dist-packages/
    Checking .pth file support in /usr/local/lib/python2.6/dist-packages/
    /usr/bin/python -E -c pass
    TEST PASSED: /usr/local/lib/python2.6/dist-packages/ appears to support .pth files
    running bdist_egg
    running egg_info
    writing requirements to OpenBlox_Game_Engine.egg-info/requires.txt
    writing OpenBlox_Game_Engine.egg-info/PKG-INFO
    writing top-level names to OpenBlox_Game_Engine.egg-info/top_level.txt
    writing dependency_links to OpenBlox_Game_Engine.egg-info/dependency_links.txt
    reading manifest file 'OpenBlox_Game_Engine.egg-info/SOURCES.txt'
    writing manifest file 'OpenBlox_Game_Engine.egg-info/SOURCES.txt'
    installing library code to build/bdist.linux-x86_64/egg
    running install_lib
    running build_py
    creating build/bdist.linux-x86_64/egg
    creating build/bdist.linux-x86_64/egg/obengine
    copying build/lib.linux-x86_64-2.6/obengine/world.py -> build/bdist.linux-x86_64/egg/obengine
    creating build/bdist.linux-x86_64/egg/obengine/phys
    copying build/lib.linux-x86_64-2.6/obengine/phys/__init__.py -> build/bdist.linux-x86_64/egg/obengine/phys
    copying build/lib.linux-x86_64-2.6/obengine/player.py -> build/bdist.linux-x86_64/egg/obengine
    copying build/lib.linux-x86_64-2.6/obengine/scripttest.py -> build/bdist.linux-x86_64/egg/obengine
    copying build/lib.linux-x86_64-2.6/obengine/luaengine.py -> build/bdist.linux-x86_64/egg/obengine
    copying build/lib.linux-x86_64-2.6/obengine/worldtest.py -> build/bdist.linux-x86_64/egg/obengine
    copying build/lib.linux-x86_64-2.6/obengine/cfg.py -> build/bdist.linux-x86_64/egg/obengine
    copying build/lib.linux-x86_64-2.6/obengine/luautils.py -> build/bdist.linux-x86_64/egg/obengine
    creating build/bdist.linux-x86_64/egg/obengine/gfx
    copying build/lib.linux-x86_64-2.6/obengine/gfx/worldsource.py -> build/bdist.linux-x86_64/egg/obengine/gfx
    copying build/lib.linux-x86_64-2.6/obengine/gfx/window3d.py -> build/bdist.linux-x86_64/egg/obengine/gfx
    copying build/lib.linux-x86_64-2.6/obengine/gfx/player.py -> build/bdist.linux-x86_64/egg/obengine/gfx
    copying build/lib.linux-x86_64-2.6/obengine/gfx/element3d.py -> build/bdist.linux-x86_64/egg/obengine/gfx
    copying build/lib.linux-x86_64-2.6/obengine/gfx/__init__.py -> build/bdist.linux-x86_64/egg/obengine/gfx
    copying build/lib.linux-x86_64-2.6/obengine/element.py -> build/bdist.linux-x86_64/egg/obengine
    copying build/lib.linux-x86_64-2.6/obengine/attrdict.py -> build/bdist.linux-x86_64/egg/obengine
    creating build/bdist.linux-x86_64/egg/obengine/utils
    copying build/lib.linux-x86_64-2.6/obengine/utils/__init__.py -> build/bdist.linux-x86_64/egg/obengine/utils
    copying build/lib.linux-x86_64-2.6/obengine/__init__.py -> build/bdist.linux-x86_64/egg/obengine
    byte-compiling build/bdist.linux-x86_64/egg/obengine/world.py to world.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/phys/__init__.py to __init__.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/player.py to player.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/scripttest.py to scripttest.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/luaengine.py to luaengine.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/worldtest.py to worldtest.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/cfg.py to cfg.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/luautils.py to luautils.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/gfx/worldsource.py to worldsource.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/gfx/window3d.py to window3d.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/gfx/player.py to player.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/gfx/element3d.py to element3d.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/gfx/__init__.py to __init__.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/element.py to element.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/attrdict.py to attrdict.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/utils/__init__.py to __init__.pyc
    byte-compiling build/bdist.linux-x86_64/egg/obengine/__init__.py to __init__.pyc
    installing package data to build/bdist.linux-x86_64/egg
    running install_data
    creating build/bdist.linux-x86_64/egg/EGG-INFO
    installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
    running install_scripts
    running build_scripts
    creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
    copying build/scripts-2.6/oblaunch.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
    changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/oblaunch.py to 755
    copying OpenBlox_Game_Engine.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying OpenBlox_Game_Engine.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying OpenBlox_Game_Engine.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying OpenBlox_Game_Engine.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    copying OpenBlox_Game_Engine.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
    zip_safe flag not set; analyzing archive contents...
    creating 'dist/OpenBlox_Game_Engine-0.1-py2.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
    removing 'build/bdist.linux-x86_64/egg' (and everything under it)
    Processing OpenBlox_Game_Engine-0.1-py2.6.egg
    removing '/usr/local/lib/python2.6/dist-packages/OpenBlox_Game_Engine-0.1-py2.6.egg' (and everything under it)
    creating /usr/local/lib/python2.6/dist-packages/OpenBlox_Game_Engine-0.1-py2.6.egg
    Extracting OpenBlox_Game_Engine-0.1-py2.6.egg to /usr/local/lib/python2.6/dist-packages
    OpenBlox-Game-Engine 0.1 is already the active version in easy-install.pth
    Installing oblaunch.py script to /usr/local/bin
    
    Installed /usr/local/lib/python2.6/dist-packages/OpenBlox_Game_Engine-0.1-py2.6.egg
    Processing dependencies for OpenBlox-Game-Engine==0.1
    Searching for lupa
    Reading http://pypi.python.org/simple/lupa/
    Best match: lupa 0.18
    Downloading http://pypi.python.org/packages/source/l/lupa/lupa-0.18.tar.gz#md5=331237744561d41a1a659e514893d938
    Processing lupa-0.18.tar.gz
    Running lupa-0.18/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Bf0ZNy/lupa-0.18/egg-dist-tmp-z2adLB
    building with Cython 0.12.1
    warning: no files found matching '*' under directory '.hg'
    lupa/_lupa.c:218: fatal error: lua.h: No such file or directory
    compilation terminated.
    error: Setup script exited with error: command 'gcc' failed with exit status 1


  2. Re: lupa/_lupa.c:218: fatal error: lua.h: No such file or directory compilation termi

    Quote Originally Posted by werthog2994
    View Post


    lupa/_lupa.c:218: fatal error: lua.h: No such file or directory

    You probably need to install the lua development package.

    To find what package provides lua.h, you can use the http://packages.ubuntu.com/ site.

    Here’s the search for lua.h in Maverick: http://packages.ubuntu.com/search?se…erick&arch=any

    which gives this file to package table:

    I’m pretty sure it’s not the fourth one. The first three packages are for different versions of lua, so you have to figure out which to install. If you have lua already installed, then match that version. Otherwise you may as well start at the latest and work backwards.

    Last edited by gmargo; December 26th, 2010 at 08:41 PM.


Bookmarks

Bookmarks


Posting Permissions

Extrodus


  • #1

Hey there, I am trying to compile the lastest revision from the GitHub and I am coming across multiple errors.

I can compile all the revs from 8.6-9.86, but for some reason these new revs are bringing up an error for me. Take a look, any help is greatly appreciated — it’s time to do an update to the latest client!

Code:

Error   2   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srcactions.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   3   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srcadmin.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   4   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srcban.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   1   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srcbaseevents.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   5   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srcbeds.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   6   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srcchat.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   8   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srccombat.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   9   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srccommands.cpp)  forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   11   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srccondition.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   7   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srcconfigmanager.cpp)   forgottenserver-mastersrcconfigmanager.h   27   1   theforgottenserver
Error   17   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srcconnection.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver
Error   14   error C1083: Cannot open include file: 'lua.h': No such file or directory (..srccontainer.cpp)   forgottenserver-mastersrcluascript.h   32   1   theforgottenserver

The list goes on, but I can’t go past 10k characters in a post.

The tutorial I used to set up my compiler = http://otland.net/f479/compiling-ho…msvc-under-windows-64-bit-184022/#post1781242

Last edited: Sep 29, 2013

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error loading vertex shader custom weapon vs30 00000000 что делать
  • Fatal error loading vertex shader custom weapon vs30 00000000 cs go как исправить
  • Fatal error loading unverified resource doom
  • Fatal error loading the db invalid argument exiting
  • Fatal error loading pixel shader custom weapon ps30

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии