linux + g++: command not found

I want to install on my Linux red-hat machine gettext-0.19.1.tar.xz.

First I do the following

cd gettext-0.19.1
./configure
make

During make it fails on g++: command not found

libtool: compile:  g++ -DIN_LIBASPRINTF -DHAVE_CONFIG_H -I. -c autosprintf.cc  - o .libs/autosprintf.o
./libtool: line 1128: g++: command not found
make[5]: *** [autosprintf.lo] Error 1
make[5]: Leaving directory `/var/tmp/gettext-0.19.1/gettext-runtime/libasprintf'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/var/tmp/gettext-0.19.1/gettext-runtime/libasprintf'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/gettext-0.19.1/gettext-runtime'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/gettext-0.19.1/gettext-runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/gettext-0.19.1'
make: *** [all] Error 2

How do I fix this?

Remark – I have GCC

which gcc
/usr/bin/gcc
Asked By: maihabunash

||

Install the suite of development tools first. Then go back to compile the software.

yum groupinstall 'Development Tools'

You could need much more than just the compiler. The Development Tools package includes the core development tools like automake, gcc, perl, python, flex, make, gdb, bison, and many more. To list all of the software in the package group, use yum as follows.

yum group info 'Development Tools'

For Fedora 20 (at least), you’ll additionally need to install gcc-c++.

For Debian-based systems, install the suite of development tools as follows.

apt-get install build-essential

In Void Linux, it’s xbps-install -Su base-devel, which provides m4, autoconf, automake, bc, binutils, bison, ed, libfl-devel, flex, libgcc-devel, kernel-libc-headers, glibc-devel, isl, cloog, mpfr, libmpc, gcc, libstdc++-devel, gcc-c++, gettext-libs, gettext, groff, libtool, make, patch, pkg-config, texinfo, unzip, and xz.

Answered By: Christopher

On CentOS 7, I only needed

yum install gcc-c++

(but maybe I already had most of the other development packages)

Answered By: mivk
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.