在osx上使用luarocks无法安装包。

我在我的OSX 10.10机器上使用brew install lua安装了lua。安装的版本是5.2.4。LuaRocks随lua包一起安装。但是,当我运行luarocks install <package_name>时,我会得到“Error: @@HOMEBREW_PREFIX@@ does not exist and your user does not have write permissions in”错误。我也尝试使用sudo luarocks install <package_name>,但它给出了相同的错误。如何解决这个问题?

求助。 谢谢

点赞
用户5165731
用户5165731

当我使用 homebrew 安装 luarocks 时,遇到了同样的问题,尝试像这样重新安装 luarocks:

$ wget http://luarocks.org/releases/luarocks-2.2.1.tar.gz
$ tar zxpf luarocks-2.2.1.tar.gz
$ cd luarocks-2.2.1
$ ./configure; sudo make bootstrap

我从这里取得了此代码片段。在执行此操作后,我成功地安装了我需要的所有模块,没有任何问题。

2015-07-28 15:41:07
用户88888888
用户88888888

这是一个 bug,是我们重新定位文本文件的方式出了问题,为了确保非 /usr/local 用户实现更广泛的瓶装移植性而引起的。

它在几周前已经解决了,我想是在7月31日。假设你的 Homebrew 安装在标准目录下,如果你执行:

rm /usr/local/etc/luarocks52/config-5.2.lua && brew update && brew reinstall lua

问题现在应该已经解决了。抱歉!

2015-08-13 22:44:14