C compiler cannot create executables

by

Every time I install a new ubuntu distro and I try to compile the first application I have this:

configure:error: C compiler cannot create executables

and this is the solution:

sudo apt-get install g++

So, I hope not to forget this next time 🙂

[EDIT: Manish, whose Linux expertise is much better than mine ;), correctly suggests:

sudo apt-get install build-essential

which is in fact less dirty than my solution]

Advertisements

4 Responses to “C compiler cannot create executables”

  1. Manish Says:

    actually I think you can also just set yourself up for general/generic development stuff by doing:

    sudo apt-get install build-essential

  2. Ettore Says:

    Thanks, edited.
    Besides, you know I’m a Mac guy 🙂

  3. bharathy Says:

    hi
    i got the same error but apt-get command not working for that what can i do
    plaese anybody helpme

  4. Ettore Says:

    Hi, what do you receive exactly when you write:
    sudo apt-get install build-essential
    ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: