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
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.
So I follow the suggestion I found on here to install torch from http://torch.ch/docs/getting-started.html
This is what I do
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
source ~/.bashrc
All of this commands are under mycount
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
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
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.
I already downloaded the dependency from GitHub.
sudo luarocks search --all
to see the packages that you can install. Since torch has its own rocks make sure that theluarocks
you are executing is the torch one and not your system's. – Wiretap