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 06-25-2009, 08:46 AM   #1
Jared1
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
How do I install gcc?


I'm using Mandriva One 2009.1, which I just installed on a non-networked machine (it is not possible to hook it up to the internet). I tried compiling a program using the ./configure and eventually the make command. However, I do not get past the ./configre command without getting errors saying unable to compile because no c compiler can be found. I looked in the software/packages utility and all of the developments tools are installed. I also found a website instructing where to download the rpms for gcc and its dependicies, and tried installing them with no luck. Is there anyway to do it from the cd? Finally, the computer is using i686 architecture, will i586 rpms work for it? i686 rpms seem hard to come by, perhaps that is the wrong route since I have had no success.

Thanks
 
Old 06-25-2009, 08:52 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
If you think that gcc is not installed then the best place to install it from is the installation media for your distribution if you do not want to connect to internet or it is not possible for you to take it online.
I would still recheck if it is installed or not because I think it should get installed in a basic installation. type gcc in terminal without arguments and see what is the output.
Also this could be that the installation path where gcc is installed is not set in your path variable.
 
Old 06-25-2009, 09:35 AM   #3
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,474

Rep: Reputation: 189Reputation: 189
Quote:
Is there anyway to do it from the cd?
No, the necessary rpms are not on the CD AFAIK. In fact, the "make" command is not on the CD along with gcc, so compiling from source is out of the question.

Quote:
I also found a website instructing where to download the rpms for gcc and its dependicies, and tried installing them with no luck.
That's what you need to do if you can't connect to the mandriva repos on the internet. Exactly what happened when you tried.

Quote:
Is there anyway to do it from the cd?
Not from the mandriva one cd. You might be able to download the entire mandriva "main" repo for 2009.1 and transfer it to a dvd. There's no way it would fit on a cd however. In addition, you may need the "contrib" repo as well which is very large.

Quote:
Finally, the computer is using i686 architecture, will i586 rpms work for it?
Yes. You can also use i386 rpms. Mandriva compiles its rpms for i586 for the most part. The architectures are backward compatible so if you have an i686 box it can use i686 rpms and below.

You best bet is to determine the mandriva packages for gcc and all dependencies. Download those rpms from the mandriva repos. Transfer those rpms to a directory on your target machine. Create a urpmi repo for that directory and add it to your urpmi sources and then you should be able to install gcc.
 
Old 06-25-2009, 11:49 AM   #4
Jared1
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, that was helpful so far.

I'm fairly certain that gcc is no installed. I type man gcc and, if forgot exaclty what it says, somethiing about "not found."

I follwed through this thread:
http://www.linuxquestions.org/questi...-linux-690334/

I found all of the dependencies, downloaded them, and transfered them to the desktop. I double click each one, in order, and the package installer took care of the rest. Is this not the correct way to do it?

When I went through all of that, nothing changed when typing man gcc in terminal or trying to compile the c program.
 
Old 06-25-2009, 11:57 AM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,474

Rep: Reputation: 189Reputation: 189
Is gcc in /usr/bin? It should be if you installed the rpm for gcc and dependencies. Did you get any error messages when installing these rpms? I wouldn't be looking at man gcc for evidence of whether gcc was installed or not. Man pages and can have separate packages and may need updating in order to display properly. Look for the executable in /usr/bin instead.

Edit: Just got back to my mandriva 2009.1 box and checked your link with what I have installed. Your link is giving packages for 2009 for starters and the packages on 2009.1 are a little different. Also, the list doesn't have the gcc preprocessor package listed(gcc-cpp-4.3.2-5mnb2) so it can't be complete. gcc won't work without the cpp package installed. Finally, you don't need to have the kernel headers installed unless you are doing some kernel compiling or compiling kernel modules. I'll try to get together a better list for you tonight when I have more time and post it back here.

In the mean time, check what gcc packages are actually installed on your system now by running:

$ rpm -qa | grep gcc

and post the output here.

Last edited by kilgoretrout; 06-25-2009 at 02:46 PM.
 
Old 06-26-2009, 08:15 AM   #6
Jared1
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
From the information here, and some other links, I have performed a few tests and collected some information that may be helpful.

First, there is no gcc in the /usr/bin folder.

From the mandriva-release file:
Mandriva Linux release 2009.1 (Official) for i586

arch command:
i686

urpmi.cfg:
{
}

I tried to add the Mandriva-One cd as a source in the package manager, and got the following error:

"Unable to add medium, errors reported:
failed to migrate removable device, ignoring media
Medium: CD (removable://media/One-20091-GNOME)"

I guess I'll try one more time, making sure I have all of the correct rpm files. I have the following list for 2009.1:

libbinutils2-2.19.51.0.2-1mnb2.i586.rpm
binutils-2.19.51.0.2-1mnb2.i586.rpm
glibc-devel-2.9-0.20081113.5mnb2.i586.rpm
manbo-mandriva-files-gcc-4.3.2-1mnb2.i586.rpm
gcc-cpp-4.3.2-5mnb2.i586.rpm
gcc-4.3.2-5mnb2.i586.rpm

Does that list look complete?

Thanks
 
Old 06-26-2009, 09:04 AM   #7
Angry_Tommy
LQ Newbie
 
Registered: May 2009
Location: Leeds
Distribution: Gentoo, Arch Linux
Posts: 25

Rep: Reputation: 17
i can give you one option how to solve your problem with missing gcc. its not 'the best' way to do but it wil probably works. it worked for me (different packages than gcc but thats not a point) many times when i used slackware when i had problems with missing packages or incorrect versions. basically you have to unpack your rpm packages manually and just copy the files without changing any file priviliges to correct directories. prefect example are slackware's *.tgz packages which are simply *.tar.gz archives. if you can not unpack rpms download gcc + necessary dependencies from slackware page and just copy those folders+files to your mandriva. after that recompile proper gcc from source and that should do the thing - you will have got your gcc installed (from source).
 
  


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
yum install gcc doesn't set the lastest gcc ver 4.3.x kim,jw Linux - Newbie 3 12-23-2008 12:51 AM
pkg-get install gcc ERROR: gcc unrecognized Raidmax Solaris / OpenSolaris 10 08-30-2007 01:51 PM
Help me install GCC today! <-- 1yr without gcc :( nectron101 Linux - Newbie 4 04-17-2006 08:57 PM
install new gcc v3.4.5 over gcc v3.2.2 on red hat 9 mlaich Linux - Newbie 2 01-01-2006 09:52 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 03:13 PM


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