29

I am trying to make Sphinx from source on a 32-bit CentOS 6 VPS.

When I run this command:

./configure --prefix=/usr/local/sphinx

I get this error output:

checking build environment
--------------------------

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no

checking for compiler programs
------------------------------

checking whether to compile debug version... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/gnotes/sphinx':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

What I don't understand is that GCC is installed so why can't configure find an acceptable C compiler?

Here's the output of yum:

sudo yum install gcc

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.metrocast.net
 * extras: centos.mirror.constant.com
 * updates: mirror.lug.udel.edu
base                                                                                                                                                                      | 3.7 kB     00:00     
extras                                                                                                                                                                    | 3.5 kB     00:00     
updates                                                                                                                                                                   | 3.4 kB     00:00     
Setting up Install Process
Package gcc-4.4.7-3.el6.i686 already installed and latest version
Nothing to do

What gives?

Garry Pettet
  • 8,096
  • 22
  • 65
  • 103

8 Answers8

39

try yum groupinstall "Development Tools"

if the installation is success then you will have a full set of development tools. Such as gcc, g++, make, ld ect. After that you can try the compilation of Code Blocks again.

Since yum is deprecated you can use dnf instead:

dnf groupinstall "Development Tools"
Idos
  • 15,053
  • 14
  • 60
  • 75
kds
  • 28,155
  • 9
  • 38
  • 55
17

Install GCC in Ubuntu Debian Base

sudo apt-get install build-essential
Lakshmikandan
  • 4,301
  • 3
  • 28
  • 37
7

i have same problem at the moment. I just run yum install gcc

Charlesliam
  • 1,293
  • 3
  • 20
  • 36
6

Try specifying CC while configuring:

CC=/usr/bin/gcc ./configure --prefix=/usr/local/sphinx

Also check if your compiler produces executables. The following should produce an a.out:

echo "int main(){0;}" | gcc -x c -
devnull
  • 118,548
  • 33
  • 236
  • 227
4

Maybe gcc is not in your path? Try finding gcc using which gcc and add it to your path if it's not already there.

mti2935
  • 11,465
  • 3
  • 29
  • 33
  • `which gcc` outputs `/usr/bin/gcc` and `echo $PATH` outputs `/usr/local/jdk/bin:/home/gnotes/perl5/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/home/gnotes/bin`. How would I add it to the path? – Garry Pettet Aug 06 '13 at 09:22
  • How can I add to the .profile file? Is there a command for it? – Ron Jun 16 '16 at 13:54
  • [to-permanently-set-path-on-linux][1] [1]: https://stackoverflow.com/a/14638025/1278112 – Shihe Zhang May 31 '17 at 05:48
1

Sometime gcc had created as /usr/bin/gcc32. so please create a ln -s /usr/bin/gcc32 /usr/bin/gcc and then compile that ./configure.

Exhausted
  • 1,867
  • 2
  • 23
  • 33
  • In that case I would suggest to instead do `CC=/usr/bin/gcc32 ./configure` instead, you should be careful when making symlinks in system directories like that since it might confuse your package manager if it would try to write to /usr/bin/gcc later. – Johan Bjäreholt Mar 09 '18 at 08:41
1

I had the same issue with mind. I tried using sudo apt-get install build-essential It still won't work. I simply created a hardlink to the gcc-x binary in the /usr/bin/ folder. sudo ls /usr/bin/gcc-x /usr/bin/gcc

That worked for me!

  • In that case I would suggest to instead do `CC=/usr/bin/gcc-x ./configure` instead, you should be careful when making symlinks in system directories like that since it might confuse your package manager if it would try to write to /usr/bin/gcc later. – Johan Bjäreholt Mar 09 '18 at 08:42
0

The below packages are also helps you,

yum install gcc glibc glibc-common gd gd-devel -y
Lakshmikandan
  • 4,301
  • 3
  • 28
  • 37