1.cd ~/
2.curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
# because of my system problem,found error about libicu55,I solve it by "sudo apt-get install libicu55:amd64"
3.git clone https://github.com/torch/distro.git ~/torch --recursive
4.cd ~/torch
5../install.sh
# fatal error: readline/readline.h: 没有那个文件或目录
# solution:sudo apt-get install libreadline-dev
#error: more than one operator "==" matches these operands: function "operator==(const __half &, const __half &)" function "operator==(half, half)" operand types are: half == half
#solution:
export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
6.source ~/.bashrc
7.input "th" in terminal
succeed!