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.

author image


Founder of, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities. Read all published posts by


newest oldest most voted
Oscar Blass
Oscar Blass

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..


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