When you attempt to compile an application for Linux from source code, you must have the prerequisite applications and libraries installed on your system. These are known as "dependencies". It is much safer and easier to install applications into your Linux distribution using your distribution's native software repositories. In your case, this would be Ubuntu's repos. You can start your synaptic package application and check to see if tgrep is available.
If it isn't, the next method I would attempt is to see if there is an already compiled .deb version somewhere (Debian's repos, possibly).
The last method I would attempt is the one you're using above... compiling from source. To find all the dependencies needed to make that application run on your system is what is known in the Linux world as "Dependency H3LL". You'll spiral down the black hole trying to satisfy dependencies when attempting to install apps this way. It can be done, but it can be H3LL to do it.
post here at LQ. If you're not very competent with compiling apps from source, I would not attempt this.