LinuxQuestions.org
Visit Jeremy's Blog.
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, 02: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, 02:40 PM   #2
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,247

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
try this
http://www.cyberciti.biz/faq/debian-...-gcc-compiler/
 
Old 04-13-2013, 02:59 PM   #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: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153
Welcome to LQ.

Which Linux OS are you using ? Name and version, please.
 
Old 04-13-2013, 03: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, 03:41 PM   #5
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: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153
# 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 03:45 PM.
 
1 members found this post helpful.
  


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


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