Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi all,
 
When I run sudo apt-get install g++ terminal display that so many packages I has are the newest version on Ubuntu 12.10. But even after I cannot compile any c++ files. Any comment on this highly appreciate.
 
Note: This Ubuntu 12.10 installation running inside a vertual box which is set up on Windows 7 64bit
Posted 23-Feb-13 2:18am
Edited 25-Feb-13 18:22pm
v2
Comments
Richard MacCutchan at 23-Feb-13 8:27am
   
What do you mean by " I cannot compile any c++ files"?
CodingLover at 23-Feb-13 9:43am
   
Actually still I can't install g++ compiler, so I cannot compile any. As I said, ever after I run the command and it says I have newest packages on so many stuff, it didn't work. Hope it's clear to you now. :)
Richard MacCutchan at 23-Feb-13 11:23am
   
So your actual problem is that you cannot install the compiler? That is not really something that we can diagnose from here.
CodingLover at 23-Feb-13 12:05pm
   
Why you say that we cannot diagnose from here?
enhzflep at 23-Feb-13 21:18pm
   
Is this a serious question?
"it disn't work" - basically meaningless. There's a stunning lack of diagnostic and/or error messages in your post.
 
Did you try using the package manager? I remember years ago having a problem - where apt-get failed, yet the graphical package manager succeeded.
 
Are you sure that the distro doesn't come with gcc? Every distro I've downloaded for years comes with it automatically.
 
I'd suggest the following two commands in the terminal.
 
sudo updatedb
locate -b g++
CodingLover at 25-Feb-13 0:46am
   
Thanks.
 
I'll try and let you know. Looks like internet is not working in my Ubuntu (Virtual Box in Windows 7)

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I would suggest making sure that all the underlying libraries and packages are up to date. Try it this way:
 
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install g++
 
If you haven't done the update/upgrade for a while, your system might be too uncooperative to accept the proposed new stuff...
  Permalink  
Comments
CodingLover at 25-Feb-13 0:43am
   
Thanks for the comment.
 
I tried the above. However, seems I have another issue now. As I said my Ubuntu version running in a VirtualBox which is setup on Windows 7. Seems that the networking in Ubuntu not working :(
CodingLover at 25-Feb-13 23:22pm
   
Finally I was able to fix the issue. Initially my network not properly connected from the virtual box. Fixed it and install the g++ compiler, and everything is working fine now. Thanks again. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 Mathew Soji 195
4 Richard MacCutchan 145
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,712
2 DamithSL 5,461
3 Manas Bhardwaj 4,916
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100