Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
1.00/5 (1 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
Updated 25-Feb-13 17:22pm
v2
Comments
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++

1 solution

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...
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900