LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-24-2011, 11:57 PM   #1
kjjohny1991
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
Installing GCC


Hai.
How to install gcc.
I do not have network manager hence cannot use apt-get install.
So downloaded package from windows.
used ./configure but cannot use make makeinstall afterward...
Any helps please.
 
Old 12-25-2011, 12:17 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by kjjohny1991 View Post
Hai.
How to install gcc.
I do not have network manager hence cannot use apt-get install.
You say you dont have network manager, but can you connect it manually via the commandline?
Quote:
So downloaded package from windows.
used ./configure but cannot use make makeinstall afterward...
Any helps please.
Why cant you use make? Do you get an error? Posting said error would be most beneficial to people trying to help you. Its highly probably that if gcc isnt installed, make wont be either.
 
Old 12-25-2011, 12:20 AM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by kjjohny1991
So downloaded package from windows.
used ./configure but cannot use make makeinstall afterward...
Well, I hate to be blunt, but of course not. You cannot compile the gcc source package if you do not have a compiler. You need to download a pre-compiled binary deb package and install that.

For instance, go to Debian Packages - gcc search results. That assumes you are using a Debian distribution. If you are using something else (e.g. Ubuntu, Mint, etc.), then you'll need to find the web page that lets you download pre-compiled binaries for your distribution.

Pick whichever gcc version you need and that also matches the version/release for your distribution. Download the package to your Windows machine. Copy the package over to your Linux machine, and install the package via the command line. For instance:
Code:
apt-get install /path/to/downloaded/gcc_package.deb
EDIT:
Be aware that you may need to download additional packages. The gcc package you download may have some software requirements of its own before it will install. The kernel headers might be one such package.

EDIT2:
I should also point out that it is very likely you have the needed package on CD/DVD if you installed your distribution from that. Check your install media if you still have them. The good thing is, if the CD/DVD does have the gcc package, it will also have any other necessary packages to support gcc on the CD/DVD as well.

Last edited by Dark_Helmet; 12-25-2011 at 12:45 AM.
 
Old 12-25-2011, 12:54 AM   #4
kjjohny1991
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
But where can I get .deb package?That link does not have one .I already have tried the tar.gz from the link but make does not work.
 
Old 12-25-2011, 01:49 AM   #5
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by kjjohny1991
That link does not have one
Yes, it does. You did not read the page.

At the very top, it says:
Code:
Exact hits
Package gcc

    * lenny (oldstable) (devel): The GNU C compiler
      4:4.3.2-2: amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc
      4:4.2.4-5: alpha
    * squeeze (stable) (devel): The GNU C compiler
      4:4.4.5-1: amd64 armel i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 sparc
    * wheezy (testing) (devel): GNU C compiler
      4:4.6.1-3: amd64 armel i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 sparc
    * sid (unstable) (devel): GNU C compiler
      4:4.6.2-2: alpha amd64 armel armhf hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k mips mipsel powerpc s390 s390x sh4 sparc sparc64
      4:4.5.2-5: hppa
As I said earlier, you need to select the package that matches your version of Debian. You have not said what distribution you are running nor have you said what version of that distribution you are using. So you need to figure that out. The most recent stable version of Debian is named "squeeze." If you are running the most recent stable version, then you would click on the link for "squeeze." And again, if you are using a distribution other than Debian (for example: Ubuntu or Mint) then these packages may not work for you.

If you had clicked on any of those links above, you would have seen a follow-up webpage. At the bottom of that follow-up webpage is a number of download links for architecture-specific deb packages (for example: amd64, i386, ia64, etc.).

EDIT:
Also, after clicking the "squeeze" link (or whichever link is appropriate for your distribution), you see a color-coded list of packages that are required, recommended, and suggested. You must download and install all packages that are indicated as required.

According to that page, you must have cpp and gcc-4.4 installed. You need to download those in addition to the plain "gcc" package. You will also need to download any required packages for cpp and gcc-4.4, and any required packages for those, and so on.

EDIT2:
If you do not want to go hunt for all these packages, then (as I mentioned before) look at your install discs to see if it contains the packages for gcc. If you do not have your install discs anymore, then you can re-download it, burn a new disc, and try to get the packages from there.

Last edited by Dark_Helmet; 12-25-2011 at 02:13 AM.
 
Old 12-25-2011, 03:43 AM   #6
kjjohny1991
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
I got my network fixed.So i am trying to install it through the command line.
Do I need to add any repos to do so .....not even any packges it reports an error.It searches the drive rather than the net...
 
Old 12-25-2011, 12:58 PM   #7
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,825

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
I got my network fixed.So i am trying to install it through the command line. Do I need to add any repos to do so....
From last members post,
Quote:
You have not said what distribution you are running nor have you said what version of that distribution you are using.
Kind of hard to advise until we have some idea what you are using. If you are using apt-get then...I have this in my notes.

apt-get update Update information from repositories. Do this before running any other commands.

apt-get install newpackage Install newpackage

apt-get upgrade Upgrade all packages that have available upgrades.

apt-get remove oldpackage Remove oldpackage

apt-get remove --purge oldpackage remove oldpackage and purge all associated files

dpkg-query --list "package*" List packages matching the pattern given, and show whether they're installed (line begins ii) or not.

To add a repository, edit /etc/apt/sources.list to add a couple of lines like this:
deb http://example.com/debian stable main
deb-src http://example.com/debian stable main

gcc should be on your install disks.
 
  


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
Installing GCC over existing gcc in Redhat linux prakasha.lunux Linux - Newbie 10 01-19-2011 09:34 PM
Installing vmware on Open Suse 11.1 - Requires original gcc 4.32 - gcc now 4.3 cyclops.matrix Linux - Software 2 08-31-2009 03:52 PM
Installing GCC Geminias Linux - Newbie 6 01-03-2006 06:34 PM
Need help on installing GCC. Jonka Linux - Software 2 11-12-2003 05:12 PM
Installing GCC 3.1 over GCC 2.96...? aaronluke Linux - General 3 09-27-2002 06:28 AM


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