Main Tutorials

error: C compiler cannot create executables – Ubuntu (Solution)

Default VI for Ubuntu is suck, i have to go install a full package of vi myself. However when i try to compile the vi source code, i hit following error

error: C compiler cannot create executables

It’s cause all my gcc compiler error, hmm…Ubuntu, why you have so many problem? Compiler also hit error….. After googling it , we can issue following command to solve it

apt-get install build-essential

Hope next release this problem will solve.

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
2 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Oscar Blass
9 years ago

VI for Ubuntu is not very good. I have to install the full package for vi instead of using the default one. When compiling it from code I get the following error:

error: C compiler cannot create executables

This is because gcc is not fully configured by default. Why does Ubuntu have this many problems. I googled this problem an found a solution. The solution is to run:

sudo apt-get install build-essential

I hope the next release of Ubuntu does not have this many problems.

Of note Ubuntu does think everyone will be compiling software. In fact, a majority of users will be browsing the web and doing other things. I think your articles are very good. Please do not consider these edits rude but I think you might benefit from them..

gilatnahal
13 years ago

I run this solution, but i still have the same problem..
Could yo help me??