oceanbase 安装步骤之一及问题汇总

来源:互联网 发布:php防止接口恶意调用 编辑:程序博客网 时间:2024/06/12 01:21

Oceanbase安装

环境:


1.这个版本的redhat默认自带的是gcc4.4.6版本,但是oceanbase需要4.1.2版本进行编译,所以要给redhat进行gcc降级。

1)下载gcc-4.1.2-54.el5.x86_64.rpmcpp-4.1.2-54.el5.x86_64.rpmrpm

2)可以通过挂载系统盘自带的yum源安装kernel-headers-2.6.32-279.el6.x86_64.rpmglibc-headers-2.12-1.80.el6.x86_64.rpmglibc-headers-2.12-1.80.el6.x86_64.rpmglibc-devel-2.12-1.80.el6.x86_64.rpmglibc-headers-2.12-1.80.el6.x86_64.rpmglibc-devel-2.12-1.80.el6.x86_64.rpmlibgomp-4.4.6-4.el6.x86_64.rpm。这些安装完成后,接着安装cpp-4.1.2-54.el5.x86_64.rpmgcc-4.1.2-54.el5.x86_64.rpm即可。

准备:

echo "exportTBLIB_ROOT=$HOME/ob-install-dir" >> ~/.bashrcecho "exportLD_LIBRARY_PATH=/usr/lib/:/usr/local/lib:$TBLIB_ROOT/lib:$HOME/ob-install-dir/lib:$LD_LIBRARY_PATH">> ~/.bashrcsource ~/.bashrc 


2.安装libtool.x86_64:

sudo yum install libtool.x86_64

注意:在使用该命令安装时,默认会update gcccpp的版本。

解决方法:

所以只能自己用4.1.2版本的gcc去编译。

http://mirrors.ustc.edu.cn/gnu/libtool/去下载适合版本的libtool,我选择的是libtool-1.5.6

然后就是./configure&&make&&sudo make install

注意:使用2.2版本的libtool会出错误,所以最好自己编译低版本的libtool

3.安装liblzo2:

sudo yum install LZO.x86_64


出现:

Nopackage LZO.x86_64 available.  * Maybe you meant: lzoError:Nothing to do


解决:

wget -chttp://www.oberhumer.com/opensource/lzo/download/lzo-2.03.tar.gztar zxf lzo-*(cd lzo-2.03; ./configure --enable-shared --prefix=/usr/ && make&& sudo make install)


 

安装后,运行下面程序进行测试:

echo "int main(){ return 0;}" > /tmp/a.c && gcc/tmp/a.c -llzo2 -o /tmp/a.out


没有返回错误即是正确的。

4.安装Snappy:

sudo yum install Snappy.x86_64Settingup Install ProcessNopackage Snappy.x86_64 available.  * Maybe you meant: snappyError:Nothing to do


 

解决:

wget -chttp://snappy.googlecode.com/files/snappy-1.0.3.tar.gztar zxf snappy-* (cd snappy-1.0.3; ./configure --prefix=/usr/ && make && sudomake install)


make的时候出现:

libtool:compile:  g++ -DHAVE_CONFIG_H -I. -csnappy.cc  -o .libs/snappy.o./libtool:line 984: g++: command not foundmake[1]:*** [snappy.lo] Error 1make[1]:Leaving directory `/home/fang/snappy-1.0.3'make:*** [all] Error 2


解决:

yum-y install gcc-c++


注意:这个命令默认也会update gcccpp的版本。所以只能通过编译g++包进行安装g++

如果单纯使用g++rpm会出现很多依赖问题,所以只能通过建立多版本的gcc系统,才能使新老gccg++兼容。以下就是关于g++降级问题的解决方案:

下载两个文件:

http://gcc.cybermirror.org/releases/gcc-4.1.2/gcc-core-4.1.2.tar.bz2http://gcc.cybermirror.org/releases/gcc-4.1.2/gcc-g++-4.1.2.tar.bz2


解压,进入gcc4.1.2文件夹中:

./configure && make && sudo make install

make的时候会出现无法找到stubs-32.h,可以通过sudo yum whatprovides*/stubs-32.h命令查找是那个包提供相关文件。然后安装即可。其实就是 glibc-devel-2.12-1.80.el6.i686。可以通过命令:

sudo yum install glibc-devel-2.12-1.80.el6.i686

安装完成后,用过修改/usr/bin/gcc指向gcc4.1.2版本链接,将/usr/bin/g++指向/usr/local/bin/g++的链接。

 

 结果如下:

[fang@localhostgcc-4.1.2]$ gcc --versiongcc(GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)Copyright(C) 2006 Free Software Foundation, Inc.Thisis free software; see the source for copying conditions.  There is NO g++(GCC) 4.1.2Copyright(C) 2006 Free Software Foundation, Inc.Thisis free software; see the source for copying conditions.  There is NO 


 

但是继续make后还是会出现问题:

g++:./.libs/libsnappy.so: No such file or directorymake[1]:*** [snappy_unittest] Error 1make[1]:Leaving directory `/home/fang/snappy-1.0.3'make:*** [all] Error 2


查看./.libs/libsnappy.so文件:

[fang@localhostsnappy-1.0.3]$ ll ./.libs/libsnappy.solrwxrwxrwx.1 fang fang 18 Mar 25 08:08 ./.libs/libsnappy.so -> libsnappy.so.1.1.1


是一个链接。缺少libsnappy.so.1.1.1。

解决:

http://rpm.pbone.net/index.php3/stat/4/idpl/18007535/dir/redhat_el_6/com/snappy-1.0.5-1.el6.rf.x86_64.rpm.html 找寻相应版本。

然后:

[fang@localhost~]$ sudo rpm -ivh snappy-1.0.5-1.el6.rf.x86_64.rpm[sudo]password for fang:warning:snappy-1.0.5-1.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID6b8d79e6: NOKEYPreparing...               ########################################### [100%]   1:snappy                ########################################### [100%]这样装的就是1.0.5版的snappy,然后建一个链接: sudo ln -s/usr/lib64/libsnappy.so.1.1.3 /usr/lib/libsnappy.so


测试一下:

echo "int main(){ return0;}" > /tmp/a.c && gcc /tmp/a.c -o /tmp/a.out -lsnappy


5.安装libnuma

sudo yum installnumactl-devel.x86_64


6.安装libaio

sudo yum installlibaio-devel.x86_64


7.安装tbnettbsys

export TBLIB_ROOT=$HOME/ob-install-dirsvn checkout http://code.taobao.org/svn/tb-common-utils/trunk/ tb-common-utils(cd tb-common-utils; sh build.sh)


安装成功后, TBLIB_ROOT所指示的目录下会有includelib两个目录,可用如下的命令验证编译器能否找到库:

echo "int main(){ return 0;}" > /tmp/a.c&& gcc /tmp/a.c -o /tmp/a.out -L$TBLIB_ROOT/lib -ltbnet-ltbsys
/tmp/a.out

 

 

8.检出oceanbase源码

svn cohttp://code.taobao.org/svn/OceanBase/trunk/ ob-src-dir ./build.sh init && ./configure--prefix=$HOME/ob-install-dir --with-release --without-test-case &&make -j2 && make install


在运行./configure --prefix=$HOME/ob-install-dir --with-release--without-test-case命令时会出现:

configure: error:TBLIB_ROOT have not been set

的错误。

解决:

查看configure文件,定位到如下句子:

if  ! test -d "${TBLIB_ROOT}/include";then

       { { $as_echo "$as_me:$LINENO:error: TBLIB_ROOT have not been set" >&5

$as_echo"$as_me: error: TBLIB_ROOT have not been set" >&2;}

可以看出必须要在${TBLIB_ROOT}路径下创建include文件夹。

在运行make -j2时会出现:

echo -n 'const char*svn_version() { const char* SVN_Version = "' > svn_version.cppmake: *** No rule tomake target `svn_dist_version', needed by `all'.  Stop.make: *** Waitingfor unfinished jobs....cat./svn_dist_version >> ./svn_version.cppcat:./svn_dist_version: No such file or directorymake: *** [svn_version.cpp] Error 1


解决:

在根目录下建立一个svn_dist_version空白文件即可。

make -j2之后,会出现这个问题:

make:*** [Makefile.in] Error 1[fang@localhostob-src-dir]$ make -j2 cd . && /bin/sh/home/fang/ob-src-dir/missing --run automake-1.11 --foreignsrc/chunkserver/Makefile.am:20:library used but `RANLIB' is undefinedsrc/chunkserver/Makefile.am:20:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/chunkserver/Makefile.am:20:   to `configure.ac' and run `autoconf' again.src/common/Makefile.am:15:library used but `RANLIB' is undefinedsrc/common/Makefile.am:15:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/common/Makefile.am:15:   to `configure.ac' and run `autoconf' again.src/common/btree/Makefile.am:1:library used but `RANLIB' is undefinedsrc/common/btree/Makefile.am:1:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/common/btree/Makefile.am:1:   to `configure.ac' and run `autoconf' again.src/common/compress/Makefile.am:8:library used but `RANLIB' is undefinedsrc/common/compress/Makefile.am:8:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/common/compress/Makefile.am:8:   to `configure.ac' and run `autoconf' again.src/common/compress/Makefile.am:9:Libtool library used but `LIBTOOL' is undefinedsrc/common/compress/Makefile.am:9:   The usual way to define `LIBTOOL' is to add`AC_PROG_LIBTOOL'src/common/compress/Makefile.am:9:   to `configure.ac' and run `aclocal' and`autoconf' again.src/common/compress/Makefile.am:9:   If `AC_PROG_LIBTOOL' is in `configure.ac',make suresrc/common/compress/Makefile.am:9:   its definition is in aclocal's search path.src/common/compress/Makefile.am:14:variable `libcomp_a_LDFLAGS' is defined but no program orsrc/common/compress/Makefile.am:14:library has `libcomp_a' as canonical name (possible typo)src/lsync/Makefile.am:28:library used but `RANLIB' is undefinedsrc/lsync/Makefile.am:28:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/lsync/Makefile.am:28:   to `configure.ac' and run `autoconf' again.src/mergeserver/Makefile.am:50:library used but `RANLIB' is undefinedsrc/mergeserver/Makefile.am:50:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/mergeserver/Makefile.am:50:   to `configure.ac' and run `autoconf' again.src/rootserver/Makefile.am:31:library used but `RANLIB' is undefinedsrc/rootserver/Makefile.am:31:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/rootserver/Makefile.am:31:   to `configure.ac' and run `autoconf' again.src/sstable/Makefile.am:19:library used but `RANLIB' is undefinedsrc/sstable/Makefile.am:19:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/sstable/Makefile.am:19:   to `configure.ac' and run `autoconf' again.src/updateserver/Makefile.am:25:library used but `RANLIB' is undefinedsrc/updateserver/Makefile.am:25:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'src/updateserver/Makefile.am:25:   to `configure.ac' and run `autoconf' again.tests/chunkserver/Makefile.am:27:library used but `RANLIB' is undefinedtests/chunkserver/Makefile.am:27:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'tests/chunkserver/Makefile.am:27:   to `configure.ac' and run `autoconf' again.tests/sstable/Makefile.am:26:library used but `RANLIB' is undefinedtests/sstable/Makefile.am:26:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'tests/sstable/Makefile.am:26:   to `configure.ac' and run `autoconf' again.tools/dump_data/Makefile.am:17:library used but `RANLIB' is undefinedtools/dump_data/Makefile.am:17:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'tools/dump_data/Makefile.am:17:   to `configure.ac' and run `autoconf' again.tools/syschecker/client/Makefile.am:17:library used but `RANLIB' is undefinedtools/syschecker/client/Makefile.am:17:   The usual way to define `RANLIB' is to add`AC_PROG_RANLIB'tools/syschecker/client/Makefile.am:17:   to `configure.ac' and run `autoconf' again.make:*** [Makefile.in] Error 1


解决方法:编辑configure.ac文件,添加AC_PROG_RANLIB .同时,这个问题是因为没有安装libtool,可以照之前的步骤安装libtool1.5.6

init的时候也会出现:

src/common/compress/Makefile.am:14:variable `libcomp_a_LDFLAGS' is defined but no program orsrc/common/compress/Makefile.am:14:library has `libcomp_a' as canonic name (possible typo)


 

我是直接跳过,进行configure的。

Make -j2出现:

 tblog.h: No such file or directory

解决方法:

新建./src/common/btree/tblog.h文件,将下列代码复制进去。

/* * (C) 2007-2010 Taobao Inc. * * This program is free software; you canredistribute it and/or modify * it under the terms of the GNU General PublicLicense version 2 as * published by the Free Software Foundation. * * * Version: $Id$ * * Authors: *  duolong <duolong@taobao.com> * */#ifndef TBSYS_LOG_H#define TBSYS_LOG_H#include <stdarg.h>#include <time.h>#include <stdio.h>#include <strings.h>#include<sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <stdlib.h>#include <errno.h>#include <deque>#include <string>#include <pthread.h>#include <sys/time.h>#define TBSYS_LOG_LEVEL_ERROR 0#defineTBSYS_LOG_LEVEL_WARN  1#defineTBSYS_LOG_LEVEL_INFO  2#defineTBSYS_LOG_LEVEL_DEBUG 3#defineTBSYS_LOG_LEVEL(level) TBSYS_LOG_LEVEL_##level, __FILE__, __LINE__,__FUNCTION__#defineTBSYS_LOG_NUM_LEVEL(level) level, __FILE__, __LINE__, __FUNCTION__#define TBSYS_LOGGERtbsys::CLogger::_logger#define TBSYS_PRINT(level,...) TBSYS_LOGGER.logMessage(TBSYS_LOG_LEVEL(level), __VA_ARGS__)#defineTBSYS_LOG_BASE(level, ...) (TBSYS_LOG_LEVEL_##level>TBSYS_LOGGER._level) ?(void)0 : TBSYS_PRINT(level, __VA_ARGS__)#define TBSYS_LOG(level,_fmt_, args...) ((TBSYS_LOG_LEVEL_##level>TBSYS_LOGGER._level) ? (void)0 :TBSYS_LOG_BASE(level, "[%ld] " _fmt_, pthread_self(), ##args))#define TBSYS_LOG_US(level,_fmt_, args...) \ ((TBSYS_LOG_LEVEL_##level>TBSYS_LOGGER._level) ? (void)0 :TBSYS_LOG_BASE(level, "[%ld][%ld][%ld] " _fmt_, \                                                           pthread_self(), tbsys::CLogger::get_cur_tv().tv_sec, \                                                           tbsys::CLogger::get_cur_tv().tv_usec, ##args))namespace tbsys {using std::deque;using std::string;/*** @brief 简单的日志系统*/class           CLogger {public:    CLogger();    ~CLogger();    /**      * @brief     *      * @param filename     * @param fmt     */    void rotateLog(constchar*filename,constchar*fmt=NULL);    /**      * @brief将日志内容写入文件     *      * @param level日志的级别     * @param file 日志内容所在的文件     * @param line 日志内容所在的文件的行号     * @param function写入日志内容的函数名称     * @param fmt     * @param ...     */    void logMessage(int level,constchar*file,int line,constchar*function,constchar*fmt, ...);    /**      * @brief设置日志的级别     *      * @param levelDEBUG|WARN|INFO|ERROR     */    void setLogLevel(constchar*level);    /**      * @brief设置日志文件的名称     *      * @param filename日志文件的名称     */    void setFileName(constchar*filename, bool flag=false);    /**      * @brief检测文件是否已经打开,标准输出,错误输出重定向     */    void checkFile();    voidsetCheck(int v) {_check= v;}    /**      * @brief设置日志文件文件的大小,达到maxFileSize就新打开一个文件     * 如果不设置此项,日志系统会忽略日志滚动     *      * @parammaxFileSize日志文件的大小     */    void setMaxFileSize(int64_t maxFileSize=0x40000000);    /**      * @brief保留最近maxFileIndex个日志文件,超出maxFileIndex个日志文件     * 会按时间先后删除,但进程重启后日志系统会按时间先后重新统计     *      * @parammaxFileIndex保留文件的最大个数     */    void setMaxFileIndex(int maxFileIndex=0x0F);staticinlinestruct timevalget_cur_tv()    {      struct timeval tv;      gettimeofday(&tv,NULL);      return tv;    };private:    int_fd;    char*_name;    int_check;    size_t_maxFileIndex;    int64_t_maxFileSize;    bool _flag;public:    static CLogger _logger;    int _level;private:    std::deque<std::string>_fileList;    staticconstchar*const _errstr[];      pthread_mutex_t_fileSizeMutex;    pthread_mutex_t _fileIndexMutex;};}#endif 源文档 <http://code.taobao.org/p/tb-common-utils/src/trunk/tbsys/src/tblog.h>


 

错误:

因为之前没有使用低版本的libtool1.5.6,使用的是2.2的,所以会出现这个问题:

../../../libtool:line 656: X--tag=CXX: command not found../../../libtool:line 689: libtool: ignoring unknown tag : command not found../../../libtool:line 656: X--mode=compile: command not found../../../libtool:line 656: X--tag=CXX: command not found../../../libtool:line 689: libtool: ignoring unknown tag : command not found../../../libtool:line 656: X--mode=compile: command not found../../../libtool:line 806: *** Warning: inferring the mode of operation is deprecated.: commandnot found../../../libtool:line 807: *** Future versions of Libtool will require -mode=MODE be specified.:command not found../../../libtool:line 950: Xg++: command not found../../../libtool:line 950: X-DPACKAGE_NAME="OceanBase": command not found../../../libtool:line 950: X-DPACKAGE_TARNAME="oceanbase": command not found../../../libtool:line 950: X-DPACKAGE_VERSION="0.2.1": command not found../../../libtool:line 806: *** Warning: inferring the mode of operation is deprecated.: commandnot found../../../libtool:line 950: X-DPACKAGE_STRING="OceanBase 0.2.1": command not found../../../libtool:line 807: *** Future versions of Libtool will require -mode=MODE be specified.:command not found../../../libtool:line 950: X-DPACKAGE_BUGREPORT="qushan@taobao.com": command not found../../../libtool:line 950: X-DSTDC_HEADERS=1: command not found../../../libtool:line 950: Xg++: command not found../../../libtool:line 950: X-DPACKAGE_NAME="OceanBase": command not found../../../libtool:line 950: X-DHAVE_SYS_TYPES_H=1: command not found../../../libtool:line 950: X-DHAVE_SYS_STAT_H=1: command not found../../../libtool:line 950: X-DHAVE_STDLIB_H=1: command not found../../../libtool:line 950: X-DPACKAGE_TARNAME="oceanbase": command not found../../../libtool:line 950: X-DHAVE_STRING_H=1: command not found../../../libtool:line 950: X-DPACKAGE_VERSION="0.2.1": command not found../../../libtool:line 950: X-DHAVE_MEMORY_H=1: command not found../../../libtool:line 950: X-DPACKAGE_STRING="OceanBase 0.2.1": command not found../../../libtool:line 950: X-DHAVE_STRINGS_H=1: command not found../../../libtool:line 950: X-DHAVE_INTTYPES_H=1: command not found../../../libtool:line 950: X-DPACKAGE_BUGREPORT="qushan@taobao.com": command not found../../../libtool:line 950: X-DHAVE_STDINT_H=1: command not found../../../libtool:line 950: X-DSTDC_HEADERS=1: command not found../../../libtool:line 950: X-DHAVE_UNISTD_H=1: command not found../../../libtool:line 950: X-DHAVE_SYS_TYPES_H=1: command not found../../../libtool:line 950: X-DHAVE_DLFCN_H=1: command not found../../../libtool:line 950: X-DHAVE_SYS_STAT_H=1: command not found../../../libtool:line 950: X-DLT_OBJDIR=".libs/": No such file or directory../../../libtool:line 950: X-DHAVE_STDLIB_H=1: command not found../../../libtool:line 950: X-DHAVE_STRING_H=1: command not found../../../libtool:line 950: X-DHAVE_MEMORY_H=1: command not found../../../libtool:line 950: X-DHAVE_STRINGS_H=1: command not found../../../libtool:line 950: X-DHAVE_INTTYPES_H=1: command not found../../../libtool:line 950: X-DHAVE_STDINT_H=1: command not found../../../libtool:line 950: X-DPACKAGE="oceanbase": command not found../../../libtool:line 950: X-DHAVE_UNISTD_H=1: command not found../../../libtool:line 950: X-DVERSION="0.2.1": command not found../../../libtool:line 950: X-DHAVE_DLFCN_H=1: command not found../../../libtool:line 950: X-DRELEASEID="": command not found../../../libtool:line 950: X-DLT_OBJDIR=".libs/": No such file or directory../../../libtool:line 950: X-I.: command not found../../../libtool:line 950: X-DPACKAGE="oceanbase": command not found../../../libtool:line 950: X-fPIC: command not found../../../libtool:line 950: X-DVERSION="0.2.1": command not found../../../libtool:line 950: X-DRELEASEID="": command not found../../../libtool:line 950: X-I.: command not found../../../libtool:line 950: X-fPIC: command not found../../../libtool:line 950: X-g: command not found../../../libtool:line 950: X-g: command not found../../../libtool:line 950: X-O2: command not found../../../libtool:line 950: X-O2: command not found../../../libtool:line 950: X-D_NO_EXCEPTION: command not found../../../libtool:line 950: X-D_NO_EXCEPTION: command not found../../../libtool:line 950: X-DCOMPATIBLE: command not found../../../libtool:line 950: X-DCOMPATIBLE: command not found../../../libtool:line 950: X-finline-functions: command not found../../../libtool:line 950: X-finline-functions: command not found../../../libtool:line 950: X-D__STDC_LIMIT_MACROS: command not found../../../libtool:line 950: X-D__STDC_LIMIT_MACROS: command not found../../../libtool:line 950: X-Wall: command not found../../../libtool:line 950: X-Werror: command not found../../../libtool:line 950: X-Wextra: command not found../../../libtool:line 950: X-Wall: command not found../../../libtool:line 950: X-Werror: command not found../../../libtool:line 950: X-Wextra: command not found../../../libtool:line 950: X-Wunused-parameter: command not found../../../libtool:line 950: X-Wformat: command not found../../../libtool:line 950: X-Wunused-parameter: command not found../../../libtool:line 950: X-fno-strict-aliasing: command not found../../../libtool:line 950: X-Wformat: command not found../../../libtool:line 950: X-Wconversion: command not found../../../libtool:line 950: X-fno-strict-aliasing: command not found../../../libtool:line 950: X-Wdeprecated: command not found../../../libtool:line 950: X-Wconversion: command not found../../../libtool:line 950: X-D__USE_LARGEFILE64: command not found../../../libtool:line 950: X-Wdeprecated: command not found../../../libtool:line 950: X-D_FILE_OFFSET_BITS=64: command not found../../../libtool:line 950: X-D__USE_LARGEFILE64: command not found../../../libtool:line 950: X-D_LARGE_FILE: command not found../../../libtool:line 950: X-D_FILE_OFFSET_BITS=64: command not found../../../libtool:line 950: X-D_LARGE_FILE: command not found../../../libtool:line 950: X-D_LARGEFILE_SOURCE: command not found../../../libtool:line 950: X-D_LARGEFILE64_SOURCE: command not found../../../libtool:line 950: X-MT: command not found../../../libtool:line 950: X-D_LARGEFILE_SOURCE: command not found../../../libtool:line 950: Xsnappy_compressor.lo: command not found../../../libtool:line 950: X-D_LARGEFILE64_SOURCE: command not found../../../libtool:line 950: X-MD: command not found../../../libtool:line 950: X-MP: command not found../../../libtool:line 950: X-MT: command not found../../../libtool:line 950: X-MF: command not found../../../libtool:line 950: Xlzo_compressor.lo: command not found../../../libtool:line 950: X.deps/snappy_compressor.Tpo: No such file or directory../../../libtool:line 950: X-MD: command not found../../../libtool:line 950: X-c: command not found../../../libtool:line 950: X-MP: command not found../../../libtool:line 998: Xsnappy_compressor.lo: command not found../../../libtool:line 950: X-MF: command not found../../../libtool:line 1003: libtool: compile: cannot determine name of library object from `':command not foundmake[5]:*** [snappy_compressor.lo] Error 1make[5]:*** Waiting for unfinished jobs....../../../libtool:line 950: X.deps/lzo_compressor.Tpo: No such file or directory../../../libtool:line 950: X-c: command not found../../../libtool:line 998: Xlzo_compressor.lo: command not found../../../libtool:line 1003: libtool: compile: cannot determine name of library object from `':command not foundmake[5]:*** [lzo_compressor.lo] Error 1make[5]:Leaving directory `/home/fang/ob-src-dir/src/common/compress'make[4]:*** [all-recursive] Error 1make[4]:Leaving directory `/home/fang/ob-src-dir/src/common'make[3]:*** [all-recursive] Error 1make[3]:Leaving directory `/home/fang/ob-src-dir/src'make[2]:*** [all] Error 2make[2]:Leaving directory `/home/fang/ob-src-dir/src'make[1]:*** [all-recursive] Error 1make[1]:Leaving directory `/home/fang/ob-src-dir'make:*** [all] Error 2 


解决方法:将libtool文件里的$echo全部替换为$ECHO