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

完成

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM