zoukankan      html  css  js  c++  java
  • Zookeeper安装后,编译C client时报错"syntax error near unexpected token `1.10.2"

    hbg@rohens:/home/program/zookeeper-3.3.3/src/c$ ./configure
    checking for doxygen... /usr/bin/doxygen
    checking for perl... /usr/bin/perl
    checking for dot... /usr/bin/dot
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    /bin/bash: /home/program/zookeeper-3.3.3/src/c/missing: No such file or directory
    configure: WARNING: 'missing' script is too old or missing
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    ./configure: line 5048: syntax error near unexpected token `1.10.2'
    ./configure: line 5048: `   AM_PATH_CPPUNIT(1.0.2)'

    查找原因时因为cppunit版本不对导致,下载对应的cppunit-1.10.2版本,地址为:

    运行 ./configure 和make以后,出现错误:

    undefined reference to `dlclose' 
    undefined reference to `dlopen' 
    undefined reference to `dlsym' 

    解决的方法是在 ./configure 后面加上参数LDFLAS=‘-ldl’:

    1. make clean  
    2. ./configure LDFLAGS='-ldl'  
    3. make  
    4. sudo make install
       

    ==========================================================

    安装完cppunit后,将文件cppunit.m4拷贝到aclocal-1.15目录下,/usr/share/aclocal-1.15/cppunit.m4,

    然后进入zookeeper的安装目录

    /home/program/zookeeper-3.3.3/src/c$ autoreconf -if

    执行命令 autoreconf -if

    再执行 ./configure

     make
    sudo make install

    完成
  • 相关阅读:
    典型用户及场景分析
    使用搜狗输入法个人感受
    第二期站立会议10
    寻找“水王”
    第二期站立会议9
    第二期站立会议8
    第二期站立会议7
    第二期站立会议6
    第二期站立会议5
    第二期站立会议4
  • 原文地址:https://www.cnblogs.com/rohens-hbg/p/12618154.html
Copyright © 2011-2022 走看看