Install gcc on Ubuntu
If you only install gcc, you will get an error saying that standard libraries are lacking.
You have to install an other package: build-essential.
To install gcc:
You have to install an other package: build-essential.
To install gcc:
sudo apt-get install gcc build-essential
43 Comments:
Which does not help what so fscking ever on computers lacking an ethernet port or internet.
Thanks, just what I needed.
thanks, will try that tonight.
this works. Thanks a LOT
Thanks for your help.
I'll try it.
thanks, i could not figure out why my stuff was not working, this was exactly what was wrong.
Thank you very much for this tip. Much faster than searching solution on ubuntu guides.
Great advice. Thanks.
Just wanted to point out that it fixes the following problem as well:
>"C compiler cannot create executables. "
Yes, that worked. gcc couldn't find header files on a newly installed ubuntu 6.10 from cd. gcc was there but all the header files were missing. It installed 30+ Meg of other stuff but at least it'll compile a hello.c prog now.
Does it work if i want to install gcc from ubuntu install cd without internet access?
tnx a lot! how nice =D
Thanks a lot for the solution. Damn, if only I had bumped into this 2 hours ago, I'd not have wasted 2 hours of my life googling.
Like anonymous said, 30+ Meg of bull, yet it at least compiles a helloworld.c LOL... nice... phew.
great, everything is solved by just a line of command
Thanks, it seems to have worked. Where did you learn how to write that command? How would I install other software?
Also, your command set up version 4.0 while it appears version 4.1 is current. How do I install the latest? I have it downloaded but I frankly don't know what to do next.
Finally, where did your command install it? I see no new entry in the menus under programming, etc. How do I start it?
Reading package lists... Done
Building dependency tree... Done
gcc is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: gcc (>= 4:4.1.1) but 4:4.0.3-1 is to be installed
Depends: g++ (>= 4:4.1.1) but it is not going to be installed Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
E: Broken packages
i get the following message can u help
i was having a "no such file or directory" error meaning that lbrary was missing, this fixed. Thanks.
Thank you! gcc is now able to compile other programs
cheers, tried downloading ubuntu dapper gcc 4.0 which was a nightmare to try and configure, who would have thought something as vital as gcc would have been left out
Spasibo!
Thank you! Now I get to hunt down dependancies for the file I'm configuring...
THANKS A LOT! I've been looking all over the place for this!
thank you!
I'm really so thankful to you ... It fixes the following error.
"C compiler cannot create executables "
Thank you very very much
Many, many thanks. I would never have figured this out on my own.
Excellent. It works very well on my laptop.
PS - I had to solve the access to internet through the wireless funtion. The solution is to use the NAT share option
thanks! working for me
thank you very much for this "magic" command!
thanks a lot!! worked fine for me :-D
thanx a lot!!!!!!!
I couldn't compile, but now everything works. Thanks for the help!
Thanks for sharing your insight! Amazing how tricky setting up a Linux system is to this day, any novice will spend (waste) a lot of time trying to figure this out.
Thanks.
In June 2008 it is still not fixed, you still have to install build-essential.
But...how are you supposed to know.
Ubuntu developers please note.
2 hours? I wasted 2 days playing with c++ compilig on linux (task that is easy like walking in windows ). Tried 4 different linuxes liveCD and installation on 3 different virtualization softs. I hope this will finaly work... You know, this OS is really a nightmare for me sometimes.
GOD Bless you so much, you just made my assignment in school much easier.
just what i wanted..awesome!
well guys.....instead of installing....ubuntu,i just switched over to graphical features available on the screen while booting....as long as cd is in the rom mY computer is working on linux,but when i tr y to compile c programs using "gcc" it gave me an error as"gcc command not found" then i used these commands to update....
1)sudo apt-get update
2)sudo apt-get install build-essential
then it took around 40min to update....now everything is working fine.....but if i restart my computer all those downloaded files are being erased and giving me same error GCC comand not found...!how can i get rid of this problem???
is it possible without using internet....
'm using UBUNTU 6.0.1...
PLEASE HELP ME...
THANKS IN ADVANCE,
REGARDS,
ANUDEEP
Yet another thank you!
Another thanks very much! I tried so much but it was your simple addition of gcc to the build-essential that got this package working for me. Amazing. Btw I commented out all other repositories in my /etc/apt/sources.list besides
deb http://ftp.us.debian.org/debian lenny main non-free contrib
because I was getting "unmet dependencies" errors otherwise. I think the reason for this is that I installed Flash Player 10 which does something to the libc6.
Hey do you know where to keep the files such .php using xampp.And also how to say that here is a php file ,parse it,using terminal.
For thos not having access to internet, you have build essential on your install disk. Just enable disk under update manager and settings. It should search for the build essentials there when you issues the apt-get command.
Happy compiling
OMG...!! my ubuntu-10.04-netbook-i386
seems says NO with the GCC.
Everytime When I already Install the Linux and I try to insert the CD
and start executing command
sudo apt-get install build-essential
it always responded with,
"
Reading package Lists...Done
Building Dependency tree
Reading State Information... Done
E: Couldn't find package build-essential
"
anyone could help me?
What should I do?
should I get the GCC Installer
(tar) manually from the Internet ??
OMG. my internet isn't configured yet.
Great! It Worked!! Thanks For Posting :) I could not install cpanel in my home server due to gcc, and now i have it :)
Post a Comment
<< Home