Я побуду Вангой и спрошу: а чего это вы пытаетесь скомпилить c++ файлы без с++ ?
Ошибка была или
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
или
/tmp/ccVb0POc.o: In function `main':
ex3.cpp:(.text+0x20): undefined reference to `std::cout'
ex3.cpp:(.text+0x25): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
ex3.cpp:(.text+0x35): undefined reference to `std::ostream::operator<<(int)'
ex3.cpp:(.text+0x42): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char)'
/tmp/ccVb0POc.o: In function `__static_initialization_and_destruction_0(int, int)':
ex3.cpp:(.text+0xf6): undefined reference to `std::ios_base::Init::Init()'
ex3.cpp:(.text+0x105): undefined reference to `std::ios_base::Init::~Init()'
collect2: error: ld returned 1 exit status
Итого, решение Вашей проблемы:
sudo apt-get install g++
g++ <input file> -o <binary>