Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8121453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:29:34+00:00 2026-06-06T05:29:34+00:00

I have installed libboost-dev through apt-get , and it’s placed in /usr/lib . /usr/lib$

  • 0

I have installed libboost-dev through apt-get, and it’s placed in /usr/lib.

/usr/lib$ ls | grep boost
libboost_filesystem.so.1.46.1
libboost_iostreams.so.1.46.1
libboost_serialization.so.1.46.1
libboost_system.so.1.46.1
libboost_thread.so.1.46.1
libboost_wserialization.so.1.46.1

But when I tried to compile a source that uses boost_thread I still got a error.

$ g++ tcp_echo.cpp -o tcp_echo -L/usr/lib -llibboost_thread
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
$ g++ tcp_echo.cpp -o tcp_echo -L/usr/lib -lboost_thread
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status

What’s the right way to install and link to libboost?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:29:36+00:00Added an answer on June 6, 2026 at 5:29 am

    One thing I notice is that you do have no libboost_thread.so. You have
    the versioned 1.46.1 file but usually libraries will create a symbolic
    link to the versioned copy with the undecorated name. That might not
    be it but it’s one thing I noticed. (This is typically done by the
    installer.) – Omaha

    I think this is the point. It imply that I installed libboost the wrong way. In fact, I only installed libboost-dev:

    sudo apt-get install libboost-dev 
    

    But what should I do is:

    sudo apt-get install libboost-dev libboost1.46-doc libboost-date-time1.46-dev ibboost-filesystem1.46-dev libboost-graph1.46-dev libboost-iostreams1.46-dev libboost-math1.46-dev libboost-program-options1.46-dev libboost-python1.46-dev libboost-random1.46-dev libboost-regex1.46-dev libboost-serialization1.46-dev libboost-signals1.46-dev libboost-system1.46-dev libboost-test1.46-dev libboost-thread1.46-dev libboost-wave1.46-dev
    

    (Or, in my particular case, install libboost-system1.46-dev libboost-thread1.46-dev at least)

    And once you install them correctly, there should be .a and .so in /usr/lib.

    /usr/lib$ ls | grep boost
    libboost_date_time.a
    libboost_date_time-mt.a
    libboost_date_time-mt.so
    libboost_date_time.so
    libboost_date_time.so.1.46.1
    libboost_filesystem.a
    libboost_filesystem-mt.a
    ... and so on ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have installed libboost-dev and libboost-asio-dev and etc. In the ubuntu 11.04 and 11.10
I have libboost installed via Ubuntu. The boost version is 1.42. I've followed the
I have installed Ubuntu 11.04 and tried to install Ruby as apt-get install ruby
I have installed Clang by using apt-get in Ubuntu, and I can successfully compile
I want to have a static Universal binary lib of Boost. (Preferable the latest
I have installed bootstrap to my Rails 3.2 app this way (through Gemfile): gem
I have installed the firewiresdk26 on my dev mac... and in the Tools/ directory
I have installed Archiva on my machine under Tomcat 6.x at http://dev.mycompany.com:8080/archiva and can
I have already installed Boost.Python. There were no erros during instalation, but I have
I've almost completely installed Boost, but I have a problem with how to set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.