错误:未找到与查询匹配的结果.对于 ubuntu 中的 luarocks [英] Error: No results matching query were found. for luarocks in ubuntu
问题描述
我是 Lua 的新手.这是我在我的新虚拟 Ubuntu 上所做的.首先我安装了从他们官网下载的lua-5.3.4.
I'm totally new in Lua. And here is what I've done on my new virtual Ubuntu. First I install the lua-5.3.4 which is download from their official website.
make linux
make install
这是依赖库的 README.md 建议我这样做.>
And this is the README.md of the dependency lib suggesting I do.
luarocks install torch
luarocks install nn
luarocks install dpnn
luarocks install torchx
luarocks install rnn
但是,无论我在哪里使用它们,它总是向我返回此错误消息.
However, it always return me this error message no matter where I use them.
错误:未找到与查询匹配的结果.
Error: No results matching query were found.
所以我按照我在这里找到的建议从 http://torch 安装火炬.ch/docs/getting-started.html
So I follow the suggestion I found on here to install torch from 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
所有这些命令都在 mycount 下
All of this commands are under mycount
vera@ubuntu:~/Documents/relation inference$
vera@ubuntu:~/Documents/relation inference$
然后我再次尝试安装依赖项并再次失败.
Then I try again to install the dependency and fail again.
sudo luarocks install rnn
sudo luarocks install nn
sudo luarocks install torch
我通过 sudo su
切换到根计数.然后当我再次 luarocks install nn
时.我明白了:
I switch to the root count by sudo su
. Then while I do luarocks install nn
again. I got this:
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: 没有那个文件或目录(this means :no that file or the dict)
compilation terminated.
Error: Build error: Failed compiling object lnn.o
当我在 root 下使用其他命令时,我仍然收到相同的错误消息.
While I use the other command under root, I still got the same error message.
root@ubuntu:/home/vera/Documents/relation inference# luarocks install rnn
Error: No results matching query were found.
root@ubuntu:/home/vera/Documents/relation inference# luarocks install torch
Error: No results matching query were found.
root@ubuntu:/home/vera/Documents/relation inference# luarocks install torch7-master
Error: No results matching query were found.
我已经从 GitHub 下载了依赖项.
I already downloaded the dependency from GitHub.
推荐答案
最后我通过这种方式解决了我的问题.
Finally I solved my issues by this way.
错误:未找到匹配查询的结果.对于 ubuntu 中的 luarocks,您可以在我的博客上找到解决方案的详细信息.
Error: No results matching query were found. for luarocks in ubuntu you can find the detail of the solution on my blog.
以下是我所做的.
首先我发现我实际上并没有安装torch,虽然我按照官方网站告诉我的方式安装了3次.(我仍然不知道为什么.)您可以通过th
First I find that I didn't install torch in fact though I did what the offical web site told me and installed it for 3 times.(And I still don't know why.)
you can test if you have successed install the torch byth
> th
______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
那么也许你仍然会发现命令 luarocks install xxx
useless.Continue.
Then maybe you will still find the command luarocks install xxx
useless.Continue.
这是我最终发现有用的解决方案.(这是中文的.如果你不明白,你可以看我写的.)
this is the solution which I finally found useful.(This is in Chinese.If you don't understand,you can see what I write down.)
下载所有依赖 github、解压和 cd 到 dict 中.
Download all of the dependency on github,unzip,and cd into the dict.
luarocks install nn-master/rocks/nn-scm-1.rockspec
luarocks install rnn-master/rocks/rnn-scm-1.rockspec
最重要的一点是你需要找到.rockspec
the most important point is that you need to find where is the .rockspec
这是一些依赖项的位置.您可能会发现它们的格式并不总是相同.
Here is some dependencies's location.And you may find they are not always in a same format.
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
在安装过程中,这就是你可能得到的.
During install,this is what you may get.
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上,找到它要求的依赖.so循环.正如你所看到的,实际上我只需要rnn, nn, optim, torch
,其他就是这些依赖请求.
So just go to the github, find the dependency it ask for.so loop.As you can see, here infact I just need rnn, nn, optim, torch
, the other is all this dependency ask for.
确保您的字典中已经安装了依赖项.
Make sure the dependency is already installed in your dict.
luarocks list
希望能帮到你.XD
这篇关于错误:未找到与查询匹配的结果.对于 ubuntu 中的 luarocks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!