LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-22-2010, 09:00 AM   #1
jhusted
LQ Newbie
 
Registered: Feb 2010
Posts: 6

Rep: Reputation: 0
Exclamation -bash: gccL command not found


New to linux. Gcc seems to be installed by not configured maybe? Below are some command line results. Is gcc installed, and if so, how do I configure it so it run properly? Thank you.

rpm -qa | grep gcc

libgcc-4.1.2-44.el5
gcc-4.1.2-44.el5
gcc-gfortran-4.1.2-44.el5
compat-libgcc-296-2.96-138
compat-gcc-34-g77-3.4.6-4
compat-gcc-34-c++-3.4.6-4
gcc-c++-4.1.2-44.el5
compat-gcc-34-3.4.6-4

gcc --version

-bash: gcc: command not found

which gcc

/usr/bin/which: no gcc in (/usr/ora/d02/oracle/fdidb/9.2.0/Apache/perl/bin:/usr/ora/d02/oracle/fdidb/9.2.0/bin:/usr/bin:/usr/sbin:/usr/ora/d02/oracle/fdidb/9.2.0/jre/1.4.2/bin:/usr/ccs/bin:/bin:/usr/bin/X11:/usr/local/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/usr/ora/d02/oracle/fdidb/9.2.0/jre/1.4.2/bin:.)
 
Old 02-22-2010, 09:03 AM   #2
eyemole80
Member
 
Registered: Jun 2004
Distribution: Fedora Core 1
Posts: 47
Blog Entries: 1

Rep: Reputation: 16
rpm -ql gcc-4.1.2-44.el5 | egrep '/usr/bin'

Use the above command , and u will know where gcc is installed.
 
Old 02-22-2010, 10:02 AM   #3
jhusted
LQ Newbie
 
Registered: Feb 2010
Posts: 6

Original Poster
Rep: Reputation: 0
rpm -ql gcc-4.1.2-44.el5 | egrep '/usr/bin'
/usr/bin/c89
/usr/bin/c99
/usr/bin/cc
/usr/bin/gcc
/usr/bin/gcov
/usr/bin/i386-redhat-linux-gcc
/usr/bin/protoize
/usr/bin/unprotoize

So this tells me where gcc is installed. Is making sure the location is in the PATH enough?
 
Old 02-22-2010, 10:46 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by jhusted View Post
Is making sure the location is in the PATH enough?
Yes. But the output from the which command shows that /usr/bin is actually in your PATH (indeed if it were not there, a lot of other things could not work). At this point you can check the integrity of the gcc package:
Code:
rpm -V gcc
and eventually if /usr/bin/gcc is a broken link, instead of a real executable. I assume the error message shown in the title of this thread is affected by a typo:
Code:
-bash: gccL command not found
 
Old 02-22-2010, 11:19 AM   #5
jhusted
LQ Newbie
 
Registered: Feb 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Yes, a typo should be gcc:


Here's my result from rpm -V gcc

.M...... /usr/bin/gcc
prelink: /lib/libc-2.5.so has a dependency cycle
prelink: /usr/bin/gcov: at least one of file's dependencies has changed since prelinking
S.?..... /usr/bin/gcov
prelink: /lib/libc-2.5.so has a dependency cycle
prelink: /usr/bin/i386-redhat-linux-gcc: at least one of file's dependencies has changed since prelinking
S.?..... /usr/bin/i386-redhat-linux-gcc
prelink: /lib/libc-2.5.so has a dependency cycle
prelink: /usr/bin/protoize: at least one of file's dependencies has changed since prelinking
S.?..... /usr/bin/protoize
prelink: /lib/libc-2.5.so has a dependency cycle
prelink: /usr/bin/unprotoize: at least one of file's dependencies has changed since prelinking
S.?..... /usr/bin/unprotoize
prelink: /lib/libc-2.5.so has a dependency cycle
prelink: /usr/libexec/gcc/i386-redhat-linux/4.1.1/collect2: at least one of file's dependencies has changed since prelinking
S.?..... /usr/libexec/gcc/i386-redhat-linux/4.1.1/collect2
 
Old 02-22-2010, 11:32 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Code:
.M...... /usr/bin/gcc
This confirms that the files originally installed by the gcc package have been modified. In particular, M means "Mode differs (includes permissions and file type)". I suspect that this is due to a subsequent installation of the compat-gcc-34 package. Can you verify what /usr/bin/gcc actually is? For example, a simple
Code:
ls -l /usr/bin/gcc*
should give some clue.
 
Old 02-22-2010, 11:48 AM   #7
jhusted
LQ Newbie
 
Registered: Feb 2010
Posts: 6

Original Poster
Rep: Reputation: 0
ls -l /usr/bin/gcc*

-rwxr-xr-x 2 root root 92956 Jun 5 2007 /usr/bin/gcc34
-rwxr-xr-x 1 root root 2018 Jun 5 2007 /usr/bin/gccmakedep
-rwxr-xr-x 2 root root 202368 Nov 5 2008 /usr/bin/gcc.orig
-rwxr-xr-x 1 root root 914 May 22 2008 /usr/bin/gcc.original
 
Old 02-22-2010, 12:06 PM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
As you can see, gcc is not there! However, looking at its size, I can confirm that /usr/bin/gcc.orig is the original /usr/bin/gcc executable (that one provided by the gcc-4.1.2 package). The question now is how to restore the gcc package. If you're not the system administrator of this machine, you have to ask him/her to restore it for you. Otherwise, you can try to rename /usr/bin/gcc.orig to /usr/bin/gcc. I doubt the solution can be so simple, due to the number of warnings you got from the package verification.

You have to investigate the reasons of these modifications and then eventually you can try to force the gcc re-installation:
Code:
yum reinstall gcc
 
Old 02-22-2010, 12:28 PM   #9
jhusted
LQ Newbie
 
Registered: Feb 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you for the suggestions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
bash: g++: command not found m_lp_ql_m Linux - Software 8 07-08-2010 01:45 PM
bash command not found gobicse Linux - Newbie 3 12-19-2007 05:46 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
bash : q : command not found (need help) JesseMor Linux - General 5 01-27-2006 12:57 AM
bash: command not found jc80 Fedora 3 03-14-2004 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:39 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