LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-13-2013, 01:30 PM   #1
klodi-alb
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
problem using the g++ compiler when writing code in c++


hello!

I've written a simple c++ code in linux text editor ,saved it properly, but when i write the command to compile it " g++ <example> <example>.cxx " i get this message:

the program 'g++' can be found in the following packages:
g++
pentium builder

when i try the command " sudo apt-get install g++ " it gives me a big list with
'already in use ' and 0 updates , 0 newly installed etc
I would appreciate your help since this is my first post.
 
Old 04-13-2013, 01:40 PM   #2
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
try this
http://www.cyberciti.biz/faq/debian-...-gcc-compiler/
 
Old 04-13-2013, 01:59 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Which Linux OS are you using ? Name and version, please.
 
Old 04-13-2013, 02:09 PM   #4
klodi-alb
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Yes i forgot to mention.Im using ubuntu 10 on a virtual box.
 
Old 04-13-2013, 02:41 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 4 .

OK, probably unsupported ? Ubuntu 10.04 or 10.10 ?
10.04 : Please replace the text in /etc/apt/sources.list with :
Code:
deb http://old-releases.ubuntu.com/ubuntu/ lucid main restricted
deb http://old-releases.ubuntu.com/ubuntu/ lucid multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ lucid-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ lucid-updates multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ lucid-backports main restricted
deb http://old-releases.ubuntu.com/ubuntu/ lucid-backports multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ lucid-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ lucid-security multiverse universe
And run $ sudo apt-get update && sudo apt-get install build-essential

10.10 :
Code:
deb http://old-releases.ubuntu.com/ubuntu/ maverick main restricted
deb http://old-releases.ubuntu.com/ubuntu/ maverick multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ maverick-backports main restricted
deb http://old-releases.ubuntu.com/ubuntu/ maverick-backports multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ maverick-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ maverick-security multiverse universe
-

Last edited by knudfl; 04-13-2013 at 02:45 PM.
 
1 members found this post helpful.
  


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
Problem in writing exploit code under linux ! *Mafia* Programming 11 03-25-2007 07:52 PM
LXer: Code Craft: The Practice of Writing Excellent Code LXer Syndicated Linux News 0 01-09-2007 04:03 AM
LXer: Democratization, Writing and Writing Code LXer Syndicated Linux News 0 11-22-2006 05:03 AM
Compiler conundrum: Which came first, a compiler, or it's source code? fr0zen Programming 21 01-29-2004 04:31 AM

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

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