How to install gcc when a current gcc is installed but not responding
Linux - NewbieThis 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
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.
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
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:
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
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:
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-
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.