Compiling from C++

It seems to me that you try to use Ubuntu’s provided ROOT 5… If that’s the case, you probably miss some of its packages (i.e. you need to install them).
However, I think you’d better uninstall Ubuntu’s ROOT 5 and take the latest ROOT 6 (the ROOT Team provides a “ready to use” binary distribution for Ubuntu 16.04).