-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 20/07/2010 10:25, Chunlin Zhang a écrit :
> I use "luarocks install stdlib" to install stdlib,but no file be copy to
> "/usr/local/share/lua",I think it is because of permission denied.So I use
> "sudo
> luarocks install stdlib",so the directory "/usr/local/share/lua" have
> "base.lua/debug_ext.lua ....",but when I use "require(base)",it is still
> output " no file '/usr/local/share/lua/5.1/base.lua'",and I check it is
> also
> permission denied.
>
> How can I do to this issue?
>
> (Perhaps it is ubuntu using problem,but I am a ubuntu newbie...)
>
> Thanks!
>
For your first qustion; when you use LuaRocks to install a package
while you aren't root, the package will get installed in
/home/<my_user>/.luarocks/ instead of /usr/local/ and become only
available for you. Moreover Lua doesn't know with its default setup that
packages can be available in the current user's home. If you want to
install a package available for all user, you should run as a sudoers.
For your second question, it looks to me like a misconfiguration of the
stdlib package since those files does not have the correct permissions.
You should at least set them to readable for all users (chmod a+r or
chmod 644).
Thomas.
seria...@___:/usr/local/share/lua/5.1$ cd /usr/local/share/lua/5.1
seria...@___:/usr/local/share/lua/5.1$ sudo chmod 644 *
seria...@___:/usr/local/share/lua/5.1$ lua
Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print (require "base")
{_M=table: 0x97fd350,_NAME=base,_PACKAGE=}
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxF2LoACgkQBV7eXqefhqhxsQCgsBe1eBQNtVyPcv9SnXZSw78Z
MSAAn0PinL8oo2j3VxcHXFzdrpns8bW6
=Z+lH
-----END PGP SIGNATURE-----
_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers