LinuxQuestions.org
Review your favorite Linux distribution.
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 07-16-2009, 08:00 AM   #1
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Rep: Reputation: 15
Unhappy GCC installed but not in the $PATH. No commands possible.


I am new to linux and using RHEL 5......

Each time i use the command ./configure....

it says, no acceptible c compiler found.

When i type in

whereis gcc

it says

/usr/libexec/gcc

When i type in echo $PATH

it says

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:./usr/libexec/gcc


It has included the gcc directory in the $PATH after i used the command...

PATH=$PATH:./usr/libexec/gcc....

but still the same problem............

when i type in gcc,,

it returns

bash: gcc: command not found


I am not able to anything......

Please help.
 
Old 07-16-2009, 08:09 AM   #2
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
Code:
PATH=$PATH:./usr/libexec/gcc....

this path setting is wrong do something like

Code:
PATH=$PATH:/usr/libexec/gcc....
The "." in the path expression written by you is colpurit
 
Old 07-16-2009, 09:42 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
The "gcc" in /usr/libexec/gcc is a folder, a directory.
Probably from the installed package 'cpp'.

To get gcc, the compiler, please do

1) su
2) yum -y install gcc

.....
 
Old 07-24-2009, 08:42 AM   #4
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Original Poster
Rep: Reputation: 15
I did both the things..........

but the outcome is not satisfactory
.........

Please help me out........

I am not registered with RHN

Is there any other way out to install gcc online manually.....


[root@localhost ~]# PATH=$PATH:/usr/libexec/gcc
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/libexec/gcc....:/usr/libexec/gcc
[root@localhost ~]# su
[root@localhost ~]# yum -y install gcc
Loading "installonlyn" plugin
Loading "rhnplugin" 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 ~]#
 
Old 07-24-2009, 09:21 AM   #5
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Red face No acceptible cc found while configuring for GCC installation.

I have downloaded

gcc 4.1.1 .tar.bz2 package

from ftp://ftp.gnu.org/gnu/gcc/

which is 16.3 mb in size.

After extracting it to a folder,

i cd into that folder and

used the ./configure command.

The result is

[root@localhost ~]# cd /root/Desktop/Linux/gcc-4.1.1
[root@localhost gcc-4.1.1]# ./configure
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH



What to do now. I am not able to move forward for the GCC installation.


Please help.

Thank You!

Using RHEL5
 
Old 07-24-2009, 09:39 AM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Do you have some specific reason for wanting to compile gcc and/or for wanting version 4.1.1?

You can use yum to install a pre built gcc. That is much easier to do now and easier to upgrade later than compiling gcc yourself. I'm not sure which gcc versions you can get prebuilt via yum. But do you really care?

If you do want to build your own copy of gcc, it is still best/easiest to start by installing a pre built copy of gcc via yum. Building gcc requires a C compiler, such as gcc. GCC has pretty good support for installing and using multiple versions on one system, so the version installed by yum doesn't need to interfere with the version you compile and install from that tar.bz2 file.
 
Old 07-24-2009, 09:44 AM   #7
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
if you really have valid reasons for compiling this, the package you downloaded details the pre-reqs in:
{untarred location}/INSTALL/prerequisites.html
 
Old 07-25-2009, 03:57 AM   #8
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Original Poster
Rep: Reputation: 15
The reason for which i am installing GCC fresh is that

GCC is installed in a path where i think shell does not search.........(Though i have included the GCC installation Directory to the $PATH)

because everytime i use
./configure command...

it says

no acceptible c compiler found

So, i was trying to install GCC in a directory which might be the Original Directory where GCC ought to be installed.

Please guide me.....

I am new to Linux.
 
Old 07-25-2009, 04:08 AM   #9
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Original Poster
Rep: Reputation: 15
The reason for which i am installing GCC fresh is that

GCC is installed in a path where i think shell does not search.........(Though i have included the GCC installation Directory to the $PATH)

because everytime i use
./configure command...

it says

no acceptible c compiler found

So, i was trying to install GCC in a directory which might be the Original Directory where GCC ought to be installed.

Please guide me.....

I am new to Linux.
 
Old 07-25-2009, 06:26 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
No problem. The identical CentOS 5 repo's can be used.
( CentOS 5 is the free version of Redhat EL 5 ).

Get the attached repo files from # 2 and # 3 here
http://www.linuxquestions.org/questi...ghlight=centos

... and read post # 2 for using the files.

.....
 
Old 07-25-2009, 07:09 AM   #11
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
I see you gave better info and are getting better answers in the other thread you started on this same topic
http://www.linuxquestions.org/questi...sible.-740515/

I'm writing this so anyone trying to figure out how to help you here will know about the connection to the other thread where you explained why you thought you already had a gcc that just wasn't being found and why you were failing to get gcc with yum.

If you shift your thread again or start and shift threads for other questions, you should be put a post on the old thread pointing to the new one and vice versa.

Of course starting a new thread at all to continue an issue is questionable. You could have posted the same extra info in the first thread. I understand the new thread changed the focus of the question, so it wasn't necessarily wrong to start a new thread. But in starting this thread you left out key details (that still matter despite the change of focus) that you had already posted in the other thread.

Meanwhile, you now got a better answer to your yum problem there, so your whole issue in this thread won't matter.

I assume you will have more questions, so if you get better at asking them, you'll get better answers sooner.

Last edited by johnsfine; 07-25-2009 at 07:26 AM.
 
Old 07-25-2009, 08:04 AM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I have merged your two similar threads. Please keep discussions like this all in on thread----start a new thread if you have a totally different question.

thanks
 
Old 07-26-2009, 04:01 AM   #13
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Sorry fellows..........

This wont happen again.

I admit my mistake.

Sorry......

Keep Smiling And Helping Newbies like me.
 
Old 07-26-2009, 04:01 AM   #14
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Original Poster
Rep: Reputation: 15
And thanks for the support you all extended.
 
Old 07-26-2009, 04:20 AM   #15
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Original Poster
Rep: Reputation: 15
i downloaded the files and after renaming,
copied them to yum.repos.d.

Now when i typed in

yum install gcc in the terminal,

it returns

[root@localhost ~]# yum install gcc
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
not using ftp, http[s], or file for repos, skipping - 5Client is not a valid release or hasnt been released yet
Error: Cannot find a valid baseurl for repo: updates


What to do now?

How can i use yum to install gcc?

Last edited by redhat5; 07-26-2009 at 04:38 AM. Reason: Mistyping
 
  


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
Adding commands to the &PATH???? JibberingJ Slackware 4 04-14-2009 08:39 PM
Many commands don't work; PATH issue? BostonMark Linux - General 3 08-15-2007 11:34 AM
Set the path for shell commands??? acidblue Fedora 2 12-24-2005 12:23 AM
Executing commands without using the full path.. LinuxBAH *BSD 2 12-02-2003 08:16 PM
Need help with path commands rdaves@earthlink.net Linux - General 7 06-27-2001 06:21 PM


All times are GMT -5. The time now is 10:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration