Results 1 to 9 of 9
Hi all,
I'm using a CentOS dedicated server via SSH. I tired to install a newer version of PHP on it but it failed on the configure command because I ...
- 09-01-2009 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 33
[SOLVED] Can't install gcc because I don't have a C compiler !?
Hi all,
I'm using a CentOS dedicated server via SSH. I tired to install a newer version of PHP on it but it failed on the configure command because I don't have a compiler.
I figured I need to install gcc, so I downloaded the source and extracted. I tried to run the configure command but it failed telling me no acceptable C compiler found in $PATH
I don't understand... I need a C compiler to install the C compiler ??
I tried to post the full output but this site is telling me I can only post URLs after I accumulate a post count of 15 - even though I'm not tying to post any URLs, I'm guessing this forum treats anything with / in it as a URL.
Any ideas? All I want is to install gcc so I can install a newer version of PHP.
Thanks in advance
- 09-01-2009 #2Yup. Freaky, isn't it?I don't understand... I need a C compiler to install the C compiler ??
Why not just install through your package manager? Actually, you probably want all the development tools if you're going to be compiling from source.Any ideas? All I want is to install gcc so I can install a newer version of PHP.
Code:su - yum groupinstall 'Development Tools'
- 09-01-2009 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
As reed9 said, you are better off installing the gcc binaries using your package manager. Building the gcc compiler suite from source is NOT an exercise for newbies.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-01-2009 #4Just Joined!
- Join Date
- Jun 2008
- Posts
- 33
Thanks guys I did what you suggested. I now get further but still hitting a wall.
When I run my PHP configure comman I get this error:
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
configure: error: DBA: Could not find necessary header file(s).
I have installed the gdbm package by using:
yum install gdbm-devel
But the error still remains. Even when I use --without-gdbm in the configure command I still get this error.
Any ideas?
- 09-01-2009 #5
I have to ask, why are you trying to compile it from source? Again, it's better to use your package manager.
Here is some help:
Slicehost Articles: CentOS - Installing Apache and PHP5
- 09-01-2009 #6Just Joined!
- Join Date
- Jun 2008
- Posts
- 33
I am compiling from source because I wanted to select the modules to install such as ssl, soap etc. Here is my configure command:
./configure --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --enable-soap --enable-xslt --with-xslt-sablot --libdir=/usr/lib/php5 --cache-file=../config.cache --with-config-file-path=/etc --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-db4=/usr --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-gd=shared --enable-gd-native-ttf --with-gettext --with-ncurses=shared --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-xml --with-expat-dir=/usr --with-dom=shared,/usr --with-dom-xslt=/usr --with-dom-exslt=/usr --with-xsl=/usr --with-xmlrpc=shared --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-pear=/usr/share/pear5 --with-imap=shared --with-imap-ssl --with-kerberos --with-ldap=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --with-mssql=shared --with-mhash=shared --with-pdo-mysql=shared,/usr --with-mcrypt=shared,/usr --with-zlib-dir=/usr/lib --with-pgsql=shared --with-snmp=shared,/usr --with-snmp=shared --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-mime-magic=/usr/share/file/magic.mime --enable-dbase --enable-pcntl
Can anyone see which option is causing the DBA error?
- 09-01-2009 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
You are probably getting the error due to a compatibility problem with the version of gdbm you have installed. This is just a guess, but I have run into similar problems when building packages from scratch like this. First, try installing the binaries as suggested by reed9. Most of what you need is probably in the standard package (ssl, soap, et al). If not, then see what you need to do to build from source.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-02-2009 #8
I don't know how it is in CentOS, but in Ubuntu, if I want to install a new module in a PHP server, I just install the package for that module and restart the PHP process.
Would that be an option, maybe?
And yet again, I don't know how it is in CentOS, but in Ubuntu you have a graphical package management system (synaptic) which makes searching for a package (even without the name of it) really easy.
If I want to install a SQLite module to my PHP server, I run synaptic and search for the package and then install it, along with SQLite.
- 09-02-2009 #9Just Joined!
- Join Date
- Jun 2008
- Posts
- 33
Thanks for the help all. I fixed it eventually by removing the --with-db4 my PHP 5.3 install is running nicely now


