"luarocks install xxx" not working

962 views
Skip to first unread message

vishnu lokhande

unread,
Mar 18, 2016, 2:30:50 AM3/18/16
to torch7
Getting the following error when I try luarocks install xxx, xxx denotes any package. Please help me solve the problem
Warning: Failed searching manifest: Failed fetching manifest for https://raw.githubusercontent.com/torch/rocks/master - Failed downloading https://raw.githubusercontent.com/torch/rocks/master/manifest - /home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master/manifest
Warning: Failed searching manifest: Failed fetching manifest for https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master - Failed downloading https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest - /home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master/manifest

Error: No results matching query were found.

I have tried doing the following but it did not solve the problem
sudo rm -rf ~/.cache/luarocks
sudo rm 
-rf ~/.luarocks
./
install.sh

Further, I have tried doing this, but even this was not usefule
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/clean-old.sh | bash
cd ~/torch
./clean.sh
./install.sh


I ran ./luarocks --verbose install penlight, which is giving the following
io.popen: 'pwd' 2> /dev/null

os.execute: cd '/home/vishnu/torch/install/bin' && test '-e' '/home/vishnu/torch/install/lib/luarocks/rocks'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-d' '/home/vishnu/torch/install/lib/luarocks/rocks'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-e' '/home/vishnu/torch/install/'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-d' '/home/vishnu/torch/install'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-e' '/home/vishnu/torch/install/'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && mkdir -p '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-d' '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master' && 'wget' --no-check-certificate --no-cache --user-agent='LuaRocks/2.3.0 linux-x86_64 via wget' --quiet --timeout=30 --tries=1  --timestamping  'https://raw.githubusercontent.com/torch/rocks/master/manifest-5.1.zip'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 4

os.execute: cd '/home/vishnu/torch/install/bin' && mkdir -p '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-d' '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master' && 'wget' --no-check-certificate --no-cache --user-agent='LuaRocks/2.3.0 linux-x86_64 via wget' --quiet --timeout=30 --tries=1  --timestamping  'https://raw.githubusercontent.com/torch/rocks/master/manifest-5.1'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 4

os.execute: cd '/home/vishnu/torch/install/bin' && mkdir -p '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-d' '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master' && 'wget' --no-check-certificate --no-cache --user-agent='LuaRocks/2.3.0 linux-x86_64 via wget' --quiet --timeout=30 --tries=1  --timestamping  'https://raw.githubusercontent.com/torch/rocks/master/manifest'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 4
Warning: Failed searching manifest: Failed fetching manifest for https://raw.githubusercontent.com/torch/rocks/master - Failed downloading https://raw.githubusercontent.com/torch/rocks/master/manifest - /home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_torch_rocks_master/manifest

os.execute: cd '/home/vishnu/torch/install/bin' && mkdir -p '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-d' '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master' && 'wget' --no-check-certificate --no-cache --user-agent='LuaRocks/2.3.0 linux-x86_64 via wget' --quiet --timeout=30 --tries=1  --timestamping  'https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest-5.1.zip'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 4

os.execute: cd '/home/vishnu/torch/install/bin' && mkdir -p '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-d' '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master' && 'wget' --no-check-certificate --no-cache --user-agent='LuaRocks/2.3.0 linux-x86_64 via wget' --quiet --timeout=30 --tries=1  --timestamping  'https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest-5.1'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 4

os.execute: cd '/home/vishnu/torch/install/bin' && mkdir -p '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/torch/install/bin' && test '-d' '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute: cd '/home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master' && 'wget' --no-check-certificate --no-cache --user-agent='LuaRocks/2.3.0 linux-x86_64 via wget' --quiet --timeout=30 --tries=1  --timestamping  'https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 4
Warning: Failed searching manifest: Failed fetching manifest for https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master - Failed downloading https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest - /home/vishnu/.cache/luarocks/https___raw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master/manifest



alban desmaison

unread,
Mar 18, 2016, 5:36:07 AM3/18/16
to torch7
Hi,

Did you had lua installed on your system before installing torch?
It looks like your `luarocks` is not the one provided by torch and thus cannot find torch packages

vishnu lokhande

unread,
Mar 18, 2016, 5:49:58 AM3/18/16
to torch7
I installed lua5.3 after installing torch. Should I remove it?

alban desmaison

unread,
Mar 18, 2016, 6:04:27 AM3/18/16
to torch7
Do you use it for another project?
The simplest would be to uninstall it. Otherwise see below.

The problem here is that torch has its version of lua. But the `luarocks` that is in the path is not the one from torch. so you cannot install torch packages with it.
You can try to run `. /home/vishnu/torch/install/bin/torch-activate` before running torch, this should make sure that you use the lua version installed with torch.
Or use directly `/home/vishnu/torch/install/bin/luarocks` as luarocks to install torch packages

Philip Goetz

unread,
Mar 19, 2016, 1:24:23 PM3/19/16
to torch7
I don't understand the cause. But I had a similar problem. I had installed torch7 in my home directory, using the instructions on the torch7 website. That failed to put the luarocks manifest anyplace where lua could see it.  (Failed in other ways as well.)  I did "rm -rf torch" to remove it all, and re-installed torch7 using the instructions from here.  That uses a different install script buried within the git repository, which worked for me on a Ubuntu 15.10 VirtualBox VM.  (Note that a VM probably can't use the GPU.)
Message has been deleted

vishnu lokhande

unread,
Mar 20, 2016, 2:26:34 AM3/20/16
to torch7
I keep getting this error when I run the line "curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-all | bash". Also, I'm  not able to run a test lua file with the command "th test.lua"
Enter code here...Error: Your user does not have write permissions in /usr/local/lib/luarocks/rocks 
-- you may want to run as a privileged user or use your local tree with --local.

vishnu lokhande

unread,
Mar 20, 2016, 9:01:46 AM3/20/16
to torch7
I removed everything including lua, luajit from the system and reinstalled torch as per this. It's working now.
Reply all
Reply to author
Forward
0 new messages