I'm using Ubuntu 14. I'm trying to install GNU Radio and, when I try to configure, pthread library is missing. I then do:

sudo apt-get install pthread

I get this as return:

akula@akula:~/OpenBts/gnuradio-3.4.0$ cd ~
akula@akula:~$ sudo apt-get install pthread
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package pthread

I already did all kinds of updates and everything else I found on the internet.

If anyone could help me, I would be grateful.

  • 2
    What is the exact error message (that prompts you to install libpthread)?
    – edwin
    Apr 23, 2014 at 18:00
  • 1
    Why do you want to install pthread? Its a C library available by default.
    – jobin
    Apr 23, 2014 at 18:04

2 Answers 2


The correct name of the package is libpthread-stubs0-dev:

sudo apt-get install libpthread-stubs0-dev
  • 1
    It's already installed in 15.10 at least.
    – the_drow
    Dec 6, 2015 at 17:56
  • 10
    Sorry I m late to the party... But I've always been wondering: how the hell do you know/find out the name of that package? There is no way you just guess such a name! Jul 15, 2017 at 10:29
  • 5
    You still kind of have to know the package name, but apt search pthread is helpful for listing packages that mention pthread.
    – benf
    Sep 1, 2017 at 21:05

sudo apt-get install libpthread-stubs0-dev seems to do nothing.

gcc -lpthread will still result in a missing pthreads error.

Use instead: gcc -pthread and get a missing main function error. This is expected behavior if everything else is okay.

This flag works on example pthread C file programs.

In Mint (thus Ubuntu) The file /lib/x86_64-linux-gnu/libpthread-2.31.so is in the libc6:amd64 package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .