Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
09-01-2009, 07:47 AM
|
#1
|
Member
Registered: Jan 2009
Posts: 40
Rep:
|
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.
Thanks in advance!
|
|
|
09-01-2009, 08:21 AM
|
#2
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep: 
|
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.
|
|
|
09-01-2009, 08:43 AM
|
#3
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
Quote:
Originally Posted by Nylex
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.
|
|
|
09-01-2009, 08:48 AM
|
#4
|
Member
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468
Rep:
|
If you plan on compiling software, you'll probably need more than just GCC.
I'd suggest you do:
# yum groupinstall "Development Tools"
|
|
|
09-01-2009, 09:35 AM
|
#5
|
Member
Registered: Jan 2009
Posts: 40
Original Poster
Rep:
|
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, 10:03 AM
|
#6
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Rep: 
|
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.
Last edited by lazlow; 09-01-2009 at 10:05 AM.
|
|
|
09-02-2009, 03:43 PM
|
#7
|
Member
Registered: Jan 2009
Posts: 40
Original Poster
Rep:
|
Thanks for the help all. I fixed it eventually by removing the --with-db4 my PHP 5.3 install is running nicely now 
|
|
|
All times are GMT -5. The time now is 11:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|