[SOLVED] Can't install gcc because I don't have a C compiler !?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: in `/ccinstall/gcc/objdir':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
Any ideas? All I want is to install gcc so I can install a newer version of PHP.
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.
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.
CentOS uses yum and rpm.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.