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 ?? Here's the output of the configure command for installing gcc Code:
[root@ds-04648 objdir]# ../gcc-4.4.1/configure --prefix=/opt/gcc4 Thanks in advance! |
Install gcc using your distro's package management system (which provides pre-built packages, so no compiler is needed). You may have to install other packages too.
|
Quote:
Run "rpm -q gcc" to verify it isn't already installed. If it isn't then run: "yum install gcc". If it is installed you may simply have a path issue. Running "rpm -ql gcc" will show you all the files installed by gcc package including the gcc comand itself. make sure the path to that is in your PATH variable. |
If you plan on compiling software, you'll probably need more than just GCC.
I'd suggest you do: # yum groupinstall "Development Tools" |
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? |
Usually the easiest way to build packages on any distro is to see how the packagers built the last version of that software and start from there. Grab the source rpm of the last version of PHP and look at the spec file. It will tell you what patches had to be applied and how to configure things.
Edit: You may also want to tell us which version you are trying to build and why you think you need it. |
Thanks for the help all. I fixed it eventually by removing the --with-db4 my PHP 5.3 install is running nicely now:D
|
All times are GMT -5. The time now is 09:17 PM. |