Error when install from source

I recently tried to update the Pytorch by reinstall pytorch from source, and it failed in building ‘torch._c’ , it says /home/use/anaconda2/compiler_compat/ld: cannot find -lpthread
/home/use/anaconda2/compiler_compat/ld: cannot find -lc
collect2: error: ld returned 1 exit .
Never happened before…

2.7/torch/csrc/jit/passes/common_subexpression_elimination.o build/temp.linux-x86_64-2.7/torch/csrc/jit/passes/peephole.o build/temp.linux-x86_64-2.7/torch/csrc/jit/passes/inplace_check.o build/temp.linux-x86_64-2.7/torch/csrc/jit/passes/onnx/peephole.o build/temp.linux-x86_64-2.7/torch/csrc/jit/generated/aten_dispatch.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/init.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/engine.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/function.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/variable.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/saved_variable.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/input_buffer.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/profiler.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/python_function.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/python_cpp_function.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/python_variable.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/python_variable_indexing.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/python_engine.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/python_hook.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/generated/VariableType.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/generated/Functions.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/generated/python_variable_methods.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/generated/python_functions.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/generated/python_nn_functions.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/batch_normalization.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/convolution.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/basic_ops.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/tensor.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/accumulate_grad.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/special.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/utils.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/init.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/onnx/convolution.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/onnx/batch_normalization.o build/temp.linux-x86_64-2.7/torch/csrc/autograd/functions/onnx/basic_ops.o build/temp.linux-x86_64-2.7/torch/csrc/onnx/onnx.pb.o build/temp.linux-x86_64-2.7/torch/csrc/onnx/onnx.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/TensorDouble.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/TensorFloat.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/TensorHalf.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/TensorLong.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/TensorInt.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/TensorShort.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/TensorChar.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/TensorByte.o build/temp.linux-x86_64-2.7/torch/csrc/distributed/Module.o build/temp.linux-x86_64-2.7/torch/csrc/cuda/Module.o build/temp.linux-x86_64-2.7/torch/csrc/cuda/Storage.o build/temp.linux-x86_64-2.7/torch/csrc/cuda/Stream.o build/temp.linux-x86_64-2.7/torch/csrc/cuda/AutoGPU.o build/temp.linux-x86_64-2.7/torch/csrc/cuda/utils.o build/temp.linux-x86_64-2.7/torch/csrc/cuda/expand_utils.o build/temp.linux-x86_64-2.7/torch/csrc/cuda/serialization.o build/temp.linux-x86_64-2.7/torch/csrc/jit/fusion_compiler.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/cuda_TensorDouble.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/cuda_TensorFloat.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/cuda_TensorHalf.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/cuda_TensorLong.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/cuda_TensorInt.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/cuda_TensorShort.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/cuda_TensorChar.o build/temp.linux-x86_64-2.7/home/use/pytorch/torch/csrc/generated/cuda_TensorByte.o build/temp.linux-x86_64-2.7/torch/csrc/cuda/nccl.o -L/home/use/pytorch/torch/lib -L/usr/local/cuda/lib64 -L/home/use/anaconda2/lib -lshm -lcudart -lnvToolsExt -lpython2.7 -o build/lib.linux-x86_64-2.7/torch/_C.so -Wl,-rpath,/usr/local/cuda/lib64 /home/use/pytorch/torch/lib/libATen.so.1 /home/use/pytorch/torch/lib/libprotobuf-nanopb.a /home/use/pytorch/torch/lib/libTHD.a /home/use/pytorch/torch/lib/libnccl.so.1 -Wl,-rpath,$ORIGIN/lib /home/use/pytorch/torch/lib/tmp_install/lib/libATen.so /home/use/pytorch/torch/lib/tmp_install/lib/libgloo.a /home/use/pytorch/torch/lib/tmp_install/lib/libgloo_cuda.a
/home/use/anaconda2/compiler_compat/ld: cannot find -lpthread
/home/use/anaconda2/compiler_compat/ld: cannot find -lc
collect2: error: ld returned 1 exit status
error: command ‘gcc’ failed with exit status 1