解决报错:lua:389: module 'json' not found:No LuaRocks module found for json

  • 报错:
/home/muli/torch/install/bin/luajit: /home/muli/torch/install/share/lua/5.1/trepl/init.lua:389: /home/muli/torch/install/share/lua/5.1/trepl/init.lua:389: module 'json' not found:No LuaRocks module found for json
	no field package.preload['json']
	no file '/root/.luarocks/share/lua/5.1/json.lua'
	no file '/root/.luarocks/share/lua/5.1/json/init.lua'
	no file '/home/muli/torch/install/share/lua/5.1/json.lua'
	no file '/home/muli/torch/install/share/lua/5.1/json/init.lua'
	no file './json.lua'
	no file '/home/muli/torch/install/share/luajit-2.1.0-beta1/json.lua'
	no file '/usr/local/share/lua/5.1/json.lua'
	no file '/usr/local/share/lua/5.1/json/init.lua'
	no file '/root/.luarocks/lib/lua/5.1/json.so'
	no file '/home/muli/torch/install/lib/lua/5.1/json.so'
	no file '/home/muli/torch/install/lib/json.so'
	no file './json.so'
	no file '/usr/local/lib/lua/5.1/json.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
	[C]: in function 'error'
	/home/muli/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
	train.lua:10: in main chunk
	[C]: in function 'dofile'
	...muli/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x00405d50
  • 解决办法:luarocks install json

你可能感兴趣的:(python)