ubuntu下安装lua和luarocks

xiaoxiao2021-02-28  133

第一步:在 http://luarocks.org/releases/ 页面选择需要的软件包:wget http://luarocks.org/releases/luarocks-2.1.0.tar.gz

我选择的是最新的软件包luarocks-2.4.2.tar.gz

第二步:

tar -zxvf luarocks-2.4.2.tar.gz

cd luarocks-2.4.2

./configure --prefix=/usr/local/luarocks,我在这一步出现如下错误:

说明你需要先安装lua,下载地址 http://www.lua.org/ftp/

wget http://www.lua.org/ftp/lua-5.3.3.tar.gz   tar -zxvf lua-5.3.3.tar.gz   make linux test   make install 还是不行,换了种办法: sudo apt-get update sudo apt-get install lua5.3

之后运行./configure --prefix=/usr/local/luarocks,又出现下面的问题:

然后我绝望了,所以下面这几步也没实现,不过这谷歌上也有相应的解决办法。

make build

make install

最后luarock的可执行文件被安装到了 /usr/local/luarocks/bin/luarocks.

第三步:所以,最后我发现两行命令就可以解决了:

sudo apt-get update

sudo apt-get install luarocks

转载请注明原文地址: https://www.6miu.com/read-17920.html

最新回复(0)