41

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
  • 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 2 '14 at 14:28
  • 2
    I wonder if there shouldn't be a canonical question regarding the command not found error. – Cristian Ciupitu Jul 2 '14 at 15:11
72

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.

  • I have perl version - v5.10.1 – maihabunash Jul 2 '14 at 11:47
  • download the gcc-c++ but stil the same problem – maihabunash Jul 2 '14 at 12:21
  • now I can use yum , but its fail on GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle: – maihabunash Jul 2 '14 at 12:37
  • Then run yum update – Christopher Oct 4 '14 at 22:08
  • On FC20 sudo yum group install "Development Tools" fails to install g++. For that you also need sudo yum install gcc-g++ – hobs Nov 6 '14 at 15:34
2

On CentOS 7, I only needed

yum install gcc-c++

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.