LinuxQuestions.org
Visit Jeremy's Blog.
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 02-14-2013, 06:33 AM   #1
akshit
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Redhat issue: "bash:gcc command not found"


I have been trying to compile my c program on redhat 6 installed with VMWARE app on my win7.
When i tried gcc filename.c
it barfed:
bash:gcc command not found
Is something wrong with the installation packages?
 
Old 02-14-2013, 06:37 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Did you check if gcc package is there? Also share output of following:-
Code:
~$ which gcc
~$ echo $PATH
~$ find / -name "gcc" -print
If gcc not found, try:-
Code:
~$ sudo yum install gcc
 
Old 02-14-2013, 07:16 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Better : 1) su

2) yum install gcc-c++
I.e. by installing gcc-c++, the packages required for gcc to function,
will also be installed. ( glibc-devel glibc-headers kernel-headers ).
 
1 members found this post helpful.
Old 02-17-2013, 12:41 AM   #4
akshit
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
execution of recommended commands

Thanks for the problem identification but i am unable to resolve it yet
I came up with this...

[root@localhost ~]# yum install gcc
Loading "rhnplugin" plugin
Loading "security" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Parsing package install arguments
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
No Match for argument: gcc
Nothing to do

[root@localhost ~]# sudo yum install gcc
Loading "rhnplugin" plugin
Loading "security" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Parsing package install arguments
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
No Match for argument: gcc
Nothing to do


[root@localhost ~]# which gcc
/usr/bin/which: no gcc in

(/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X1

1R6/bin:/home/Akshit/bin)

[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11
R6/bin:/home/Akshit/bin

[root@localhost ~]# find / -name "gcc" -print
/usr/libexec/gcc

[root@localhost ~]# su
[root@localhost ~]# yum install gcc-c++
Loading "rhnplugin" plugin
Loading "security" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Parsing package install arguments
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
No Match for argument: gcc-c++
Nothing to do


TIA
 
Old 02-17-2013, 12:54 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
This system is not registered with RHN.
RHEL is a comercial OS.
The OS can be used when you pay the licence / subscription. Else not.

Don't want to pay ? Then do not use RHEL.
Please install the identical free version instead : CentOS 6.3 .
http://www.centos.org/

-
 
  


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
"-bash: et: command not found" when using "su -" cal7 Linux - General 5 08-04-2011 02:09 PM
[SOLVED] "bash : links :command not found" error in apache server piyusharora420 Linux - Newbie 2 11-07-2010 01:16 AM
build Cinelerra 2.1 for x86_64, bash "arch" command not found? newtovanilla Linux - Newbie 4 07-08-2008 05:28 PM
"bash: rpm: command not found" errom when trying to install any package sandeepchau123 Linux - General 16 07-06-2008 03:58 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM

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

All times are GMT -5. The time now is 09:26 AM.

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