Kompilowanie kodu wielowątkowego za pomocą g ++

Mam najprostszy kod:

#include <iostream>
#include <thread>

void worker()
{
    std::cout << "another thread";
}

int main()
{
    std::thread t(worker);
    std::cout << "main thread" << std::endl;
    t.join();
    return 0;
}

chociaż nadal nie mogę go skompilowaćg++ biegać.

Więcej szczegółów:

$ g++ --version
g++ (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Polecenie do kompilacji:

$ g++ main.cpp -o main.out -pthread -std=c++11

Bieganie:

$ ./main.out 
terminate called after throwing an instance of 'std::system_error'
  what():  Enable multithreading to use std::thread: Operation not permitted
Aborted (core dumped)

A teraz utknąłem. W każdym powiązanym wątku przez Internet zaleca się dodanie-pthread kiedy już to mam.

Co ja robię źle?

PS: To nowa instalacja ubuntu 13.10. Tylkog++ pakiet został zainstalowany i takie drobne rzeczychromium itp

PPS:

$ ldd ./a.out 
linux-vdso.so.1 => (0x00007fff29fc1000) 
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb85397d000) 
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb853767000) 
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb85339e000) 
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb85309a000) 
/lib64/ld-linux-x86-64.so.2 (0x00007fb853c96000)

PPPS: zclang++ (v3.2) kompiluje się i działa poprawnie

PPPPS: chłopaki, to nie jest duplikatJakie są poprawne opcje łącza do użycia std :: thread w GCC pod linuxem?

PPPPPS:

$ dpkg --get-selections | grep 'libc.*dev'
libc-dev-bin                    install
libc6-dev:amd64                 install
libclang-common-dev             install
linux-libc-dev:amd64                install

questionAnswers(4)

yourAnswerToTheQuestion