Click here to Skip to main content
13,191,400 members (63,396 online)
Rate this:
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 1:18am
Updated 25-Feb-13 17:22pm
Richard MacCutchan 23-Feb-13 8:27am
What do you mean by " I cannot compile any c++ files"?
CodingLover 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 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 23-Feb-13 12:05pm
Why you say that we cannot diagnose from here?
enhzflep 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 25-Feb-13 0:46am

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
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...
CodingLover 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 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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171017.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2017
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