Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lua Track: 'busted' command not found. #75

Open
aule555 opened this issue Sep 15, 2019 · 22 comments
Open

lua Track: 'busted' command not found. #75

aule555 opened this issue Sep 15, 2019 · 22 comments

Comments

@aule555
Copy link

aule555 commented Sep 15, 2019

Hi everyone, i'm not easy with Lua but i've tried to run this command in my terminal like it's simply described in the readme exercice. I've searched for an anwser but i've found anything. Someone have an idea ?
Regards.

@glennj
Copy link

glennj commented Sep 15, 2019

Check the INSTALLATION document for the Lua track: https://github.com/exercism/lua/blob/master/docs/INSTALLATION.md

@rpottsoh
Copy link
Member

What should be checked for? What problem are you seeing?

@aule555
Copy link
Author

aule555 commented Sep 15, 2019

@glennj i've tried to reinstall all for busted and i have this error during the installation:


busted 2.0.0-1 depends on luafilesystem >= 1.5.0 (not installed)
Installing https://luarocks.org/luafilesystem-1.7.0-2.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.2 -c src/lfs.c -o src/lfs.o
src/lfs.c:66:17: fatal error: lua.h: Aucun fichier ou dossier de ce type
 #include <lua.h>
                 ^
compilation terminated.

Error: Failed installing dependency: https://luarocks.org/luafilesystem-1.7.0-2.src.rock - Build error: Failed compiling object src/lfs.o

@rpottsoh i'm on the second exercice from the lua track, "Hamming", and i just want test my exercice before to send it. The README just say "To run the tests, run the command busted from within the exercise directory." But it seems like there is no busted command, even in the exercice folder.

@NobbZ
Copy link
Member

NobbZ commented Sep 15, 2019

i've tried to reinstall all for busted and i have this error during the installation:

So then install its dependencies. From the error message it seems as if it were missing the lua development headers. Since you haven't told us which operating system you are using, we can't really tell you the name of the package or from where you could install it.

For ubuntu based systems its probably liblua5.3-dev you are missing, thats explicitely mentioned on the install page linked.

If you are on a different linux please tell us and we'll help you find the correct package.

@aule555
Copy link
Author

aule555 commented Sep 15, 2019

Nevermind, i'm on Bunsenlabs (debian 9 - based)

@NobbZ
Copy link
Member

NobbZ commented Sep 16, 2019

I am not used to debian based systems, but as far as I remember, they have similar naming conventions as ubuntu.

So libluaX.Y-dev (where X.Y is the version of the lua you installed) should work.

@aule555
Copy link
Author

aule555 commented Sep 16, 2019

I have already installed lua5.3 and it's apparently the appropriate version. I've got the same problem.

@glennj
Copy link

glennj commented Sep 16, 2019

Have you installed liblua5.3-dev? Please follow the given instructions:

$ sudo apt-get install lua5.3 liblua5.3-dev luarocks
$ luarocks install busted

@aule555
Copy link
Author

aule555 commented Sep 16, 2019

yes i've done it and i have this error during busted installation.

@glennj i've tried to reinstall all for busted and i have this error during the installation:


busted 2.0.0-1 depends on luafilesystem >= 1.5.0 (not installed)
Installing https://luarocks.org/luafilesystem-1.7.0-2.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.2 -c src/lfs.c -o src/lfs.o
src/lfs.c:66:17: fatal error: lua.h: Aucun fichier ou dossier de ce type
 #include <lua.h>
                 ^
compilation terminated.

Error: Failed installing dependency: https://luarocks.org/luafilesystem-1.7.0-2.src.rock - Build error: Failed compiling object src/lfs.o

@glennj
Copy link

glennj commented Sep 17, 2019

OK, looks like the header files aren't getting installed. What happens when you do this?

$ sudo apt-get install liblua5.3-dev

@aule555
Copy link
Author

aule555 commented Sep 17, 2019

$ sudo apt-get install liblua5.3-dev

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
liblua5.3-dev is already the newest version (5.3.3-1).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 1 non mis à jour.

I know there is french but i see any error message. Should i try to uninstall / re-install ?

@glennj
Copy link

glennj commented Sep 17, 2019

I notice that the error message for building luafilesystem includes this:

gcc -O2 -fPIC -I/usr/include/lua5.2 -c src/lfs.c -o src/lfs.o

So I wonder why it found /usr/includer/lua5.2 when you're talking about having installed lua5.3

@aule555
Copy link
Author

aule555 commented Sep 17, 2019

should i try an apt-get autoremove lua lua5.3-dev and re-install packages after ?

@glennj
Copy link

glennj commented Sep 17, 2019

I'd try to figure out how the luafilesystem build decided lua5.2 should be in the include path.

Also, what's in $HOME/.luarocks? What's in /usr/local/etc/luarocks? /usr/local/lib/luarocks?

What do you see with type -a luarocks?

@aule555
Copy link
Author

aule555 commented Sep 17, 2019

$ ls $HOME/.luarocks
ls: cannot access '/home/$USER/.luarocks': No such file or directory

anything found.

$ ls /usr/local/etc/luarocks
ls: cannot access '/usr/local/etc/luarocks': No such file or directory

same.

$ ls /usr/local/lib/luarocks
rocks
$ ls -a /usr/local/lib/luarocks/rocks
.  ..  index.html  lua_cliargs  manifest  manifest-5.1  manifest-5.2  manifest-5.3
$ type -a luarocks
luarocks is /usr/bin/luarocks

@NobbZ
Copy link
Member

NobbZ commented Sep 17, 2019

Can you please prefix all commands with LANG=C to see their unlocalized output? Its hard for us to follow the french output…

@aule555
Copy link
Author

aule555 commented Sep 17, 2019

Nevermind.. i've edited my previous message !

@sshine
Copy link

sshine commented Sep 19, 2019

@aule555: Have you found a solution to your problem?

@aule555
Copy link
Author

aule555 commented Sep 20, 2019

Unfortunately no, i'm still searching.

@NobbZ
Copy link
Member

NobbZ commented Sep 20, 2019

Please remove all lua related packages from you system and then install only the 5.3 packages.

@aule555
Copy link
Author

aule555 commented Sep 23, 2019

Hi, i have noticed 2 things.
During the installation, i have this warning:

$- sudo apt install luarocks
...
Making manifest for /usr/local/lib/luarocks/rocks
Warning: This looks like a local rocks tree, but you did not pass --local-tree.
Generating index.html for /usr/local/lib/luarocks/rocks
...

Futhermore:

$- luarocks
...
CONFIGURATION
	Lua version: 5.3
	Configuration files:
		System: /etc/luarocks/config.lua (ok)
		User  : /home/$USER/.luarocks/config-5.3.lua (not found)

	Rocks trees in use: 
		/home/c1c3r0/.luarocks
		/usr/local

Config file in user is not found. Peharps these can be a hint ?

@iHiD iHiD transferred this issue from exercism/exercism Oct 7, 2019
@sshine
Copy link

sshine commented Oct 7, 2019

It seems that @glennj detected a problem that was not replied to:

I notice that the error message for building luafilesystem includes this:

gcc -O2 -fPIC -I/usr/include/lua5.2 -c src/lfs.c -o src/lfs.o

So I wonder why it found /usr/includer/lua5.2 when you're talking about having installed lua5.3

Could it be that you have the non--dev version of lua5.2 and the -dev version of lua5.3, and the luarocks program is conflicted wrt. which version to align with?

In any way, have you considered removing all versions of lua other than the one you intend to work with, remove all cached configuration of lua in e.g. ~/.luarocks and similar, check that you have the file /usr/include/lua5.3/lua.h and installing luarocks refers to that file rather than some other 5.2 file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants