Just install the
g++-4.4 packages and make sure you call the right compiler version on the command line, e.g.
Depending on the source you are trying to compile, you can usually specify the compiler in the
You might want to switch the default compiler on your system by telling Ubuntu this using
update-alternatives --config cc
update-alternatives --config c++
Note that this is a system-wide setting, so I would not recommend doing this unless compiling this source is the only purpose of this system.