configure error: Could not link against boost_system

前端 未结 10 1586
星月不相逢
星月不相逢 2021-02-05 05:52

I\'m trying to install a package (soccer simulator 2d) on Debian. When I go to the directory and run ./configure, I get the following:

reza@debian:~         


        
相关标签:
10条回答
  • 2021-02-05 05:58

    Check this post. I had the same problem. I am on 64 Bit machine. You have to specify the path to the 64 bit libraries. I found this post which fixes the problem.

    0 讨论(0)
  • 2021-02-05 06:10

    I encountered the same issue and adding the --with-boost-libdir=XXX did not work, however when I switched to gcc v9.3 everything compiled and the boost libraries linked in.

    Check what version your boost library was compiled with and match the compiler version.. might help.

    0 讨论(0)
  • 2021-02-05 06:11

    No expert here, but my $.02:

    First, Boost is only mostly a headers-only library. For some libraries, you do have to build, and add to your lib path; boost_system is one of those libs.

    Second, it's easy to overlook the fact that you can build the Boost libs as static libs, or as shared libs, and if you've built one and are trying to link against the other, that might account for your problem.

    ./b2 runtime-link=shared will create shared; ./b2 runtime-link=static will build static libs.

    Hope this helps :)

    0 讨论(0)
  • 2021-02-05 06:14

    I just had this issue and for the benefit of anyone else, make sure you look at the configure output very closely! There is a bug in the checks, so if Boost library B is missing, you will see this:

    checking whether the A library is available... yes
    checking for exit in -lA... yes
    checking whether the B library is available... no
    configure: error: Could not link against A
    

    Note that although the error message complains about A, the missing library is actually B! If you install library B then the check will succeed.

    0 讨论(0)
  • 2021-02-05 06:17

    I thought I had it installed but

    $ sudo apt-get install libboost1.48-*
    

    fixed the problem for me by installing missing boost packages.

    0 讨论(0)
  • 2021-02-05 06:18

    On a Debian based 64-bit machine, the following command fixed this error for me:

      ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu
    
    0 讨论(0)
提交回复
热议问题