74

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
polym
  • 10,672
  • 9
  • 41
  • 65
maihabunash
  • 6,973
  • 19
  • 64
  • 80
  • 5
    You are ruining your system. To install new software, you should be using `yum` and existing repositories. **Please stop to read RedHat's own manuals** before entering any more commands as root. – Deer Hunter Jul 02 '14 at 14:28
  • 2
    I wonder if there shouldn't be a canonical question regarding the command not found error. – Cristian Ciupitu Jul 02 '14 at 15:11

2 Answers2

112

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.

Christopher
  • 15,611
  • 7
  • 51
  • 64
15

On CentOS 7, I only needed

yum install gcc-c++

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

RalfFriedl
  • 8,816
  • 6
  • 23
  • 34
mivk
  • 3,446
  • 29
  • 31