Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 编译文件时在ubuntu上找不到一些boost库_C++_Linux_Ubuntu_Gcc_Boost - Fatal编程技术网

C++ 编译文件时在ubuntu上找不到一些boost库

C++ 编译文件时在ubuntu上找不到一些boost库,c++,linux,ubuntu,gcc,boost,C++,Linux,Ubuntu,Gcc,Boost,我正在尝试编译此存储库: 有一个用于编译的标准makefile 虽然我已经安装了boost库“libboost all dev”,但我遇到了这样一个错误: /usr/bin/ld: cannot find -lboost_random-mt /usr/bin/ld: cannot find -lboost_timer-mt /usr/bin/ld: cannot find -lboost_chrono-mt /usr/bin/ld: cannot find -lboost_system-mt c

我正在尝试编译此存储库:

有一个用于编译的标准makefile

虽然我已经安装了boost库“libboost all dev”,但我遇到了这样一个错误:

/usr/bin/ld: cannot find -lboost_random-mt
/usr/bin/ld: cannot find -lboost_timer-mt
/usr/bin/ld: cannot find -lboost_chrono-mt
/usr/bin/ld: cannot find -lboost_system-mt
collect2: error: ld returned 1 exit status
../graehl/graehl.mk:331: recipe for target 'bin/linux/carmel' failed
make: *** [bin/linux/carmel] Error 1
我怎样才能解决这个问题


谢谢,

如果您的系统中有所需的软件包,请尝试使用此命令来searc。因此,如果你有它,你可以试着编译项目,注意你的boots库是如何安装的。在README.md中,编写了:

cd carmel; make -j 4 install BOOST_SUFFIX=-mt INSTALL_PREFIX=/usr/local
# BOOST_SUFFIX= depends on how your boost libraries are installed - ls /usr/lib/libboost*.so
(prerequisites: GNU Make (3.8) C++ compiler (GCC 5, clang 3.7, or visual studio 2015 will do) and Boost, which you probably already have on your linux system; for Mac, you can get them from Homebrew. For windows: MSVC2015 should work; you can also use cygwin or mingw.

如果您的系统中有所需的软件包,请尝试使用此命令来searc。因此,如果你有它,你可以试着编译项目,注意你的boots库是如何安装的。在README.md中,编写了:

cd carmel; make -j 4 install BOOST_SUFFIX=-mt INSTALL_PREFIX=/usr/local
# BOOST_SUFFIX= depends on how your boost libraries are installed - ls /usr/lib/libboost*.so
(prerequisites: GNU Make (3.8) C++ compiler (GCC 5, clang 3.7, or visual studio 2015 will do) and Boost, which you probably already have on your linux system; for Mac, you can get them from Homebrew. For windows: MSVC2015 should work; you can also use cygwin or mingw.

所以我认为问题在于你没有告诉你的链接器boots库在哪里。 我想当时我读了这个问题 因此,使用此命令可以知道库的位置

dpkg -S <name of library>

对于-lboost\u random-mt

,我认为问题在于你没有告诉你的链接器boots库在哪里。 我想当时我读了这个问题 因此,使用此命令可以知道库的位置

dpkg -S <name of library>

谢谢你,卡里诺。但是我有所有的先决条件。你能给我看一下“dpkg-libboost-all-dev”的输出吗?例如,首先你必须发现靴子的库在哪里:使用“dpkg-S boost\u random-mt”。我使用的输出是:“/usr/lib/x86_64-linux-gnu/libboost_random.so.1.58.0”。然后您必须以如下方式启动make命令:cd carmel;make-j4安装BOOST_后缀=-mt/usr/lib/x86_64-linux-gnu安装_前缀=/usr/local谢谢Carlino。但是我有所有的先决条件。你能给我看一下“dpkg-libboost-all-dev”的输出吗?例如,首先你必须发现靴子的库在哪里:使用“dpkg-S boost\u random-mt”。我使用的输出是:“/usr/lib/x86_64-linux-gnu/libboost_random.so.1.58.0”。然后您必须以如下方式启动make命令:cd carmel;make-j4安装BOOST_后缀=-mt/usr/lib/x86_64-linux-gnu安装_前缀=/usr/localI对不起,我在这个操作系统问题上有点不好。我如何才能完全解决这个问题?在make文件中有一个包含boots库路径的变量。您必须使用dpkg-S命令发现库的路径并设置这些变量?对不起,我在这个问题上完全是个傻瓜。我的意思是,在makefile中。当你使用make命令时,你可以知道变量是什么:所以如果你写cd carmel;make-j4 install BOOST_SUFFIX=-mt/usr/lib/x86_64-linux-gnu install_PREFIX=/usr/local BOOST_SUFFIX是-mt/usr/lib/x86_64-linux-gnuI对不起,我在这个操作系统问题上有点不好。我如何才能完全解决这个问题?在make文件中有一个包含boots库路径的变量。您必须使用dpkg-S命令发现库的路径并设置这些变量?对不起,我在这个问题上完全是个傻瓜。我的意思是,在makefile中。当你使用make命令时,你可以知道变量是什么:所以如果你写cd carmel;make-j4安装BOOST_后缀=-mt/usr/lib/x86_64-linux-gnu安装_前缀=/usr/local BOOST_后缀为-mt/usr/lib/x86_64-linux-gnu