How to get a compiler gcc, cc, cl.exe...? (literally 1st time unix user)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to get a compiler gcc, cc, cl.exe...? (literally 1st time unix user)
# 1  
Old 06-16-2010
How to get a compiler gcc, cc, cl.exe...? (literally 1st time unix user)

Hi all,
I've done hours of reading on google and can't find an answer...
I'm trying to compile/install the Apache web server on a Unix vm.

When i try ./compile (the file's been unzipped already), I get this error:
Code:
[apacheweb@gisc-vm-s-5 httpd-2.2.15]$ ./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring APR library
Platform: x86_64-unknown-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.4.2
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/apacheweb/httpd-2.2.15/srclib/apr':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
configure failed for srclib/apr

t seems I'm missing a few things, gcc, cc, cl.exe
Now most people are saying online gcc SHOULD be installed already, but when i type this command in, I get:

Code:
/usr/bin/which: no gcc in

I'm lost as to how I can get a gcc installed so I can compile things. I've tried downloading gcc-3.3.2.tar and what not, but without a compiler, these won't be installed, correct?

Any help on where to start on tackling this problem? THANKS!!

Last edited by Scott; 06-16-2010 at 07:09 PM.. Reason: Please use code tags
# 2  
Old 06-16-2010
You don't say what OS you are running on other than "unix", so I can't be more specific than this, but your OS should have a package management system or something along those lines that can install gcc and it's dependencies for you.

For example, on CentOS, or other RedHat variants, you could do

Code:
# yum install gcc

or

Code:
# yum groupinstall "Development Tools"

but it's going to be different commands to do more or less the same thing on different OSs.

Generally speaking, installing your vendor supplied gcc and other tools is a better path than trying to bootstrap and compile gcc itself.
# 3  
Old 06-16-2010
Quote:
Originally Posted by eddlo
I'm lost as to how I can get a gcc installed so I can compile things. I've tried downloading gcc-3.3.2.tar and what not, but without a compiler, these won't be installed, correct?

Any help on where to start on tackling this problem? THANKS!!
I'd recommend, as did malcolmpdx, using a package manager if one is available.

If you don't have one though, gcc can be built from the tarball you have as it has bootstrapping capability. Do note that 3.3.2 is a pretty old version.
# 4  
Old 06-16-2010
thanks guys; I'm not sure what you mean by "operating system"....(clearly newbie at this), I'm running on Win XP on a virtual machine under the "SSH Tectia Terminal" if that means anything to you.

I was trying to use the yum command but it says I need to be a root user.
"You need to be root to perform this command."

When I try "$ root sudo apacheweb" that returns "root: command not found."

I think the best way, from my understanding of your replies and web research, is to use the yum command but I can't seem to become a root user (I am not the system admin on this vm) and successfully execute.

It's probably elementary, but I can't figure out how to become a root user to use this yum command. Any pointers?
# 5  
Old 06-16-2010
If you don't have root privileges, you should find who the sysadmin on this vm is, and ask them to install apache for you, or better yet, tell them what you're trying to accomplish and they can help you figure out the right way to do it.
# 6  
Old 06-16-2010
Is there a way to use sudo to become a root user?

---------- Post updated at 05:08 PM ---------- Previous update was at 05:05 PM ----------

sweet! somehow sudo -i allowed me to become a root user and then i was able to use yum install gcc. this stuff is seemingly all so random...wish it was more straightforward.
# 7  
Old 06-16-2010
I very much hope that this is a VM on your own machine, and not a production machine.

Smilie

Good luck!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

A question regarding the gcc compiler ...

It might be a simple one but I have this question bothering me for sometime. When we do a symbol search inside the library directory (i.e. /usr/lib/*) via tools like nm; it takes a while to give us the results. However, its very quick when gcc is invoked to compile a program with the very same... (11 Replies)
Discussion started by: Praveen_218
11 Replies

2. UNIX for Dummies Questions & Answers

cc compiler and gcc compiler

hi, can we install gcc compiler in unix based OS(sun solar,IBM AIX,HP,etc) and also can we install sun cc compiler in AIX environment and vice versa. and more ..is linux support cc compiler regards Ajay (3 Replies)
Discussion started by: ajaysahoo
3 Replies

3. Programming

gcc compiler

Which gcc compiler release had the Arm 9 multicore support?Whether the compiler that used for the single Arm 9 core can be used for its multicore systems ? If gcc not support,please tell me which are the compilers that are available for Arm 9 multicore systems (including commerical).Whether... (0 Replies)
Discussion started by: sujith4u87
0 Replies

4. Shell Programming and Scripting

gcc compiler

I am using open suse linux. I want to install gcc compiler in my machine. I ahve checked man gcc and man cc. But it's not there. Can someone help me (4 Replies)
Discussion started by: pritish.sas
4 Replies

5. Ubuntu

./configure command Error while trying to install GCC compiler on unix machine

Hi, I need to install the GCC compiler on a my Linus machine. First step is to run the ./configure command and here we need to specify ./configure --target="target machine name (CPU type-Manufacturer-OS) or other way would be just give the command ./configure and it guesses the target name... (11 Replies)
Discussion started by: viji19812001
11 Replies

6. Ubuntu

gcc compiler

where to download gcc compiler for ubuntu? how to install? how to build and run "c programs"? screen shots if possible.....:b::D tutorials too:cool: (5 Replies)
Discussion started by: villanarun
5 Replies

7. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

8. Programming

gcc compiler

i write c++ code it run perfectely with g++ compiler but same code when i compile with GCC compiler it gives linker error , followed these linker error /tmp/ccfZtXOQ.o(.text+0x22): In function `main': conf_system.cpp: undefined reference to `operator new(unsigned int)'... (5 Replies)
Discussion started by: munnu
5 Replies

9. UNIX for Dummies Questions & Answers

cc compiler / gcc

:confused: I have a question concerning gcc. IŽd like to install the gcc on my Mac OS X, but when I try to run the configure command I get the following message: floriant% ./configure ./configure: read-only variable: PWD Configuring for a powerpc-apple-darwin5.4 host. *** This configuration... (2 Replies)
Discussion started by: florian.turck
2 Replies
Login or Register to Ask a Question