错误:在Ubuntu上没有匹配luarocks查询的结果
2017-3-6 20:45:36
收藏:0
阅读:193
评论:3
我完全是Lua新手。这是我在新的虚拟Ubuntu上所做的。首先,我从官方网站下载了lua-5.3.4。
make linux
make install
这是依赖库的README.md建议我这样做。
luarocks install torch
luarocks install nn
luarocks install dpnn
luarocks install torchx
luarocks install rnn
但是,无论我在哪里使用它们,它始终返回此错误消息。
错误:没有匹配查询的结果。
因此,我按照在此处找到的建议从http://torch.ch/docs/getting-started.html安装火炬
这是我所做的
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
source ~/.bashrc
所有这些命令都是在我的计数下执行的
vera@ubuntu:~/Documents/relation inference$
然后我再次尝试安装依赖项,但再次失败。
sudo luarocks install rnn
sudo luarocks install nn
sudo luarocks install torch
我通过sudo su切换到root计数。然后,当我再次执行luarocks install nn时,我得到了这个:
root@ubuntu:/home/vera/Documents/relation inference# luarocks install nn
Installing https://rocks.moonscript.org/nn-1.0.4-1.src.rock...
Using https://rocks.moonscript.org/nn-1.0.4-1.src.rock... switching to 'build' mode
gcc -O2 -fPIC -I/usr/include/lua5.1 -c lnn.c -o lnn.o
lnn.c:4:23: fatal error: nanomsg/nn.h: 没有那个文件或目录(这意味着:没有该文件或该字典)
compilation terminated.
Error: Build error: Failed compiling object lnn.o
当我在root下使用其他命令时,我仍然得到相同的错误消息。
root@ubuntu:/home/vera/Documents/relation inference# luarocks install rnn
Error:没有匹配查询结果。
root@ubuntu:/home/vera/Documents/relation inference# luarocks install torch
Error:没有匹配查询结果。
root@ubuntu:/home/vera/Documents/relation inference# luarocks install torch7-master
Error:没有匹配查询结果。
我已经从GitHub下载了依赖项。
点赞
用户3189466
要解决它,请按照以下步骤:
sudo apt install luarocks
sudo ~/torch/install/bin/luarocks install nn
2017-07-26 10:39:26
用户9092353
你应该使用 torch 提供的 luarocks。
把 ~/torch/install/bin 加入你的 $PATH 作为第一个条目。
这样你就可以使用 luarocks install,而不会出现这样的问题。
更多信息,请参阅以下链接 - https://github.com/torch/nngraph/issues/52
2017-12-13 06:27:50
评论区的留言会收到邮件通知哦~
推荐文章
- Lua 虚拟机加密load(string.dump(function)) 后执行失败问题如何解决
- 我想创建一个 Nginx 规则,禁止访问
- 如何将两个不同的lua文件合成一个 东西有点长 大佬请耐心看完 我是小白研究几天了都没搞定
- 如何在roblox studio中1:1导入真实世界的地形?
- 求解,lua_resume的第二次调用继续执行协程问题。
- 【上海普陀区】内向猫网络招募【Skynet游戏框架Lua后端程序员】
- SF爱好求教:如何用lua实现游戏内调用数据库函数实现账号密码注册?
- Lua实现网站后台开发
- LUA错误显式返回,社区常见的规约是怎么样的
- lua5.3下载库失败
- 请问如何实现文本框内容和某个网页搜索框内容连接,并把网页输出来的结果反馈到另外一个文本框上
- lua lanes多线程使用
- 一个kv数据库
- openresty 有没有比较轻量的 docker 镜像
- 想问一下,有大佬用过luacurl吗
- 在Lua执行过程中使用Load函数出现问题
- 为什么 neovim 里没有显示一些特殊字符?
- Lua比较两个表的值(不考虑键的顺序)
- 有个lua简单的项目,外包,有意者加微信 liuheng600456详谈,最好在成都
- 如何在 Visual Studio 2022 中运行 Lua 代码?

最终我通过以下方法解决了我的问题。
Error: No results matching query were found. for luarocks in ubuntu,你可以在我的博客上找到解决方案的详细信息。
以下是我的做法。
首先,我发现我实际上并没有安装 Torch,尽管我按照官方网站的指示进行了三次安装。(我仍然不知道为什么。)你可以通过
th命令来检测是否成功安装了 Torch。> th ______ __ | Torch7 /_ __/__ ________/ / | Scientific computing for Lua. / / / _ \/ __/ __/ _ \ | Type ? for help /_/ \___/_/ \__/_//_/ | https://github.com/torch | http://torch.ch然后, 你可能仍然会发现命令
luarocks install xxx无效。接下来。这是我最终发现有用的解决方案(这是中文的。如果你不明白,你可以看我写下的内容)。
在 Github 上下载所有的依赖项,解压并进入文件夹。
luarocks install nn-master/rocks/nn-scm-1.rockspec luarocks install rnn-master/rocks/rnn-scm-1.rockspec最重要的一点是你需要找到
.rockspec的位置。以下是一些依赖项的位置。你可能会发现它们并不总是以同样的格式。
luarocks install torchx-master/torchx-scm-1.rockspec luarocks install Moses-master/rockspec/moses-1.4.0-1.rockspec luarocks install dpnn-master/rocks/dpnn-scm-1.rockspec luarocks install rnn-master/rocks/rnn-scm-1.rockspec luarocks install optim-master/optim-1.0.5-0.rockspec在安装过程中,你可能会得到以下提示。
pnn-scm-1.rockspec Using dpnn-master/rocks/dpnn-scm-1.rockspec... switching to 'build' mode Missing dependencies for dpnn: moses >= 1.3.1 mkdir: æ— æ³•åˆ›å»ºç›®å½•"/home/vera/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master": æƒé™ä¸å¤Ÿ mkdir: æ— æ³•åˆ›å»ºç›®å½•"/home/vera/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master": æƒé™ä¸å¤Ÿ mkdir: æ— æ³•åˆ›å»ºç›®å½•"/home/vera/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master": æƒé™ä¸å¤Ÿ Warning: Failed searching manifest: Failed creating temporary cache directory /home/vera/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master mkdir: æ— æ³•åˆ›å»ºç›®å½•"/home/vera/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master": æƒé™ä¸å¤Ÿ mkdir: æ— æ³•åˆ›å»ºç›®å½•"/home/vera/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master": æƒé™ä¸å¤Ÿ mkdir: æ— æ³•åˆ›å»ºç›®å½•"/home/vera/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master": æƒé™ä¸å¤Ÿ Warning: Failed searching manifest: Failed creating temporary cache directory /home/vera/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master所以,只需转到 Github,找到它要求的依赖项所需的依赖项,循环进行。正如你所看到的,实际上在这里我只需要
rnn, nn, optim, torch,其他的都是此依赖项所要求的。确保依赖项已经安装在你的文件夹中。
luarocks list希望能帮助到你。XD