gearman安装,提示错误:configure: error: could not find boost

背景及最终解决方案

在CentOS 7上安装gearman时,提示错误:configure: error: could not find boost,最终解决方案是:php

先安装:html

# yum install -y boost boost-devellinux

发现问题仍是没解决,最终经过Bing找到了正确的答案,还要继续安装:c++

# yum install gcc-c++.x86_64 gperfgit

最后,再执行 ./configure  完美经过。github

 

安装与排查过程详细说明

一、下载gearmanspring

进入:https://github.com/gearman/gearmand/releases ,下载: gearmand-1.1.18.tar.gzsegmentfault

二、本地解压php7

tar -xzvf ./gearmand-1.1.18.tar.gzspa

三、执行

./configure

 

错误来了,提示:could not find boost

checking for boostlib >= 1.39... configure: We could not detect the boost libraries (version 1.39 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
configure: error: could not find boost

网上找了一圈,不少答案都只是写着:

解决办法

# yum install -y boost boost-devel

便可

 摘自:http://www.bubuko.com/infodetail-448566.html

 

根据提示,进行安装,并确保已经安装boost:

[root@iz8vbetvcrpn38l0x1kd06z gearmand-1.1.18]# yum install -y boost boost-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * remi-php71: mirrors.tuna.tsinghua.edu.cn
 * remi-safe: mirrors.tuna.tsinghua.edu.cn
Package boost-1.53.0-27.el7.x86_64 already installed and latest version
Package boost-devel-1.53.0-27.el7.x86_64 already installed and latest version
Nothing to do

 

安装的目录位于:/usr/include/boost,而且根据上面英文的错误提示,查看安装的boost版本号为:

#define BOOST_VERSION 105300

#define BOOST_LIB_VERSION "1_53"

版本为1.53,是高于1.39的。但为何依然找不到呢?

 

继续再从新看多几遍英文错误提示,继续在/etc/environment追加环境变量:

export BOOST_ROOT=/usr/include/boost

source后依旧不行。

 

起色

继续查了一通,在众多资料中找到了:

搞定了,zypper in gcc gcc-c++,后面这个gcc-c++没安装。

摘自:http://tieba.baidu.com/p/3481148738?traceid=

 

可是仍是有点迷糊。

 

转用Bing,在国外找到了解决方案:

I had the same issue compiling 1.1.12
boost-devel was installed but wasn't being detected, even when I pass --with-boost

For whatever reason installing these packages allowed it to compile

yum install gcc-c++.x86_64 gperf

摘自:https://github.com/gearman/gearmand/issues/68

 

完美解决

至此,问题已经解决,而且./configure 经过。

 

config.status: executing libtool commands
---
Configuration summary for gearmand version 1.1.18

   * Installation prefix:       /usr/local
   * System type:               pc-linux-gnu
   * Host CPU:                  x86_64

 

附:

php7的gearman扩展安装,请参考:https://segmentfault.com/a/1190000011692431

 

是以记。

相关文章
相关标签/搜索