James_Arambam:

The C++ compiler does not support required functions. This is very likely
due to a known bug in GCC 5 (and maybe other versions) on Ubuntu 17.10 and
newer. For more information, see:
https://github.com/pytorch/pytorch/issues/5229 


In the issue, this link 327 seems to help building PyTorch with your GCC.
Could you check it?