LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-14-2009, 11:10 PM   #1
Nadishka
LQ Newbie
 
Registered: Oct 2009
Posts: 10

Rep: Reputation: 0
How to install gcc when a current gcc is installed but not responding


when i tried to install gcc-3.0.4 following problems are occured


* using tar zxvf extract gcc-3.0.4*.tar.gz files
* mkdir objdir;cd objdir
*then the following problem occured......

ot@localhost gcc-build]# /usr/gcc/gcc-3.0.4/configure --prefix=/opt-program-suffix=-3.0.4
Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /usr/gcc/gcc-build using "mt-frag"
/tmp/cNf3807/cNf3807.pos: line 7: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.


prior to this we got these results

[root@localhost ~]# which gcc
/usr/bin/which: no gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/libexec/gcc/i386-redhat-linux/3.4.3:/usr/java/jdk1.6.0_16/bin:/usr/apache-ant-1.7.1/bin:/root/bin)


[root@localhost ~]# set
ANT_HOME=/usr/apache-ant-1.7.1
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="00" [2]="15" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu")
BASH_VERSION='3.00.15(1)-release'
CC=gcc
COLORS=/etc/DIR_COLORS.xterm
COLORTERM=gnome-terminal
COLUMNS=80
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-9An1DiKmNp
DESKTOP_SESSION=default
DIRSTACK=()
DISPLAY=:0.0
EUID=0
GDMSESSION=default
GNOME_DESKTOP_SESSION_ID=Default
GNOME_KEYRING_SOCKET=/tmp/keyring-kLC8m2/socket
GROUPS=()
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc-1.2-gnome2
G_BROKEN_FILENAMES=1
HISTFILE=/root/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/root
HOSTNAME=localhost.localdomain
HOSTTYPE=i386
IFS=$' \t\n'
INPUTRC=/etc/inputrc
JAVA_HOME=/usr/java/jdk1.6.0_16
KDEDIR=/usr
LANG=en_US.UTF-8
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=24
LOGNAME=root
LS_COLORS='no=00:fi=00:di=00;34:ln=00;36i=40;33:so=00;35:bd=40;33;01:cd=40;33;01r=01;05;37;41:mi =01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=0 0;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.g z=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
MACHTYPE=i386-redhat-linux-gnu
MAIL=/var/spool/mail/root
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/libexec/gcc/i386-redhat-linux/3.4.3:/usr/java/jdk1.6.0_16/bin:/usr/apache-ant-1.7.1/bin:/root/bin
PIPESTATUS=([0]="0" [1]="0")
PPID=3757
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
PS1='[\u@\h \W]\$ '
PS2='> '
PS4='+ '
PWD=/root
RHINO_HOME=/usr/RhinoSDK
SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/3814
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=2
SSH_AGENT_PID=3844
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-MfaKTe3843/agent.3843
SUPPORTED=en_US.UTF-8:en_US:en
TERM=xterm
UID=0
USER=root
WINDOWID=35660772
XAUTHORITY=/root/.Xauthority
_
to my knowledge there is a previous version of gcc is installed in /usr/libexec/i386-......
so I set the environmental variable for the new gcc and don't know whether it has been correctly set .The above command would display all my efforts in setting up environmental variable and the following I tried after above stuff

[root@localhost gcc-build]# make
Configuring in ./libiberty
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for ar... ar
checking for ranlib... ranlib
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
make: *** [configure-target-libiberty] Error 1


[root@localhost gcc-build]# make install
/bin/sh /usr/gcc/gcc-3.0.4/mkinstalldirs /opt-program-suffix=-3.0.4 /opt-program-suffix=-3.0.4
mkdir /opt-program-suffix=-3.0.4




please reply to this.Thank you.

Last edited by Nadishka; 10-15-2009 at 12:45 AM.
 
Old 10-14-2009, 11:21 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Dude, it doesn't sound like you've got gcc installed.

1. If you really think "gcc" is somewhere on your system, you can search for it with a brute-force method like this:
Quote:
find / -name gcc -print 2>/dev/null
2. The "/usr/gcc/gcc-3.0.4" you downloaded is apparently a *source* distribution. In other words, you need to build it. And of course, you can't build it (or anything else) without an existing compiler.

3. The *easiest* approach is to just download a binary gcc RPM. For example:

http://www.rpmfind.net/linux/rpm2htm....php?query=gcc

http://rpm.pbone.net/

'Hope that helps .. PSM
 
Old 10-15-2009, 02:23 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
and WHY do you need such an OLD gcc( gcc-3.0.4) this in not even the legacy gcc3.4

even IF you manage to get that antique compiler installed i dought that ANYTHING you might be able to build will even run .

Gcc 4.4.1 is the current
 
Old 10-15-2009, 03:20 AM   #4
Nadishka
LQ Newbie
 
Registered: Oct 2009
Posts: 10

Original Poster
Rep: Reputation: 0
while installing gcc 4.4.1 rpm i got following error
so i searched to download glibc-devel-2.3.4-2.19.i386.rpm
but it was not available..


[root@localhost tmp]# rpm -i gcc-4.3.0-8.i386.rpm
warning: gcc-4.3.0-8.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
binutils >= 2.17.50.0.17-3 is needed by gcc-4.3.0-8.i386
cpp = 4.3.0-8 is needed by gcc-4.3.0-8.i386
glibc-devel >= 2.2.90-12 is needed by gcc-4.3.0-8.i386
libc.so.6(GLIBC_2.4) is needed by gcc-4.3.0-8.i386
libgcc >= 4.3.0-8 is needed by gcc-4.3.0-8.i386
libgomp = 4.3.0-8 is needed by gcc-4.3.0-8.i386
libgomp.so.1 is needed by gcc-4.3.0-8.i386
rtld(GNU_HASH) is needed by gcc-4.3.0-8.i386
Suggested resolutions:
glibc-devel-2.3.4-2.19.i386.rpm

Can you help me with this...
 
Old 10-15-2009, 04:03 AM   #5
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by Nadishka View Post
while installing gcc 4.4.1 rpm i got following error
so i searched to download glibc-devel-2.3.4-2.19.i386.rpm
but it was not available..


[root@localhost tmp]# rpm -i gcc-4.3.0-8.i386.rpm
warning: gcc-4.3.0-8.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
binutils >= 2.17.50.0.17-3 is needed by gcc-4.3.0-8.i386
cpp = 4.3.0-8 is needed by gcc-4.3.0-8.i386
glibc-devel >= 2.2.90-12 is needed by gcc-4.3.0-8.i386
libc.so.6(GLIBC_2.4) is needed by gcc-4.3.0-8.i386
libgcc >= 4.3.0-8 is needed by gcc-4.3.0-8.i386
libgomp = 4.3.0-8 is needed by gcc-4.3.0-8.i386
libgomp.so.1 is needed by gcc-4.3.0-8.i386
rtld(GNU_HASH) is needed by gcc-4.3.0-8.i386
Suggested resolutions:
glibc-devel-2.3.4-2.19.i386.rpm

Can you help me with this...
You don't say which distribution you are running, but either:

Code:
# yum install gcc
-- or --

Code:
# apt-get install gcc
Should work.
 
Old 10-15-2009, 04:19 AM   #6
Nadishka
LQ Newbie
 
Registered: Oct 2009
Posts: 10

Original Poster
Rep: Reputation: 0
The Distribution is Red Hat Enterprise Linux AS4
and the above commands didn't work.!
 
Old 10-15-2009, 03:33 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
use the rhel 4 command "up2date "

yum is used in rhel 5

for rhel 4 i think that gcc3.4 was the default
depending on when the last update from red hat was ( when did you stop paying red hat for updates) that might have been updated -- maybe-

Last edited by John VV; 10-15-2009 at 03:36 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum install gcc doesn't set the lastest gcc ver 4.3.x kim,jw Linux - Newbie 3 12-22-2008 11:51 PM
install gcc-3.4.6 in slackware-current lordwolf Slackware 21 05-30-2007 01:19 AM
Compiling gcc without any gcc installed my_kappa Linux - Software 5 01-30-2006 12:15 AM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM
cc/gcc not installed...and how to install sfingerh Linux - Software 3 07-27-2002 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration