安装讯搜xunsearch libevent时遇到的问题,如何解决?

在unbtun上安装搜索引擎讯搜xunsearch,遇到了安装libevent依赖时的一个坑,下面看看错误,然后是怎么解决的。

Checking scws ... 1.2.3
Checking scws dict ... ok
Checking libuuid ... yes: /usr
Checking xapian-core-scws ... 1.2.22
Checking libevent ... no
Installing libevent (2.0.21-stable) ... 
Extracting libevent package ...
Configuring libevent ...
Compiling & installing libevent ...
-----
 static BIO_METHOD methods_bufferevent = {
                   ^~~~~~~~~~~~~~~~~~~
Makefile:793: recipe for target 'bufferevent_openssl.lo' failed
make[2]: *** [bufferevent_openssl.lo] Error 1
make[2]: Leaving directory '/home/xx/mnt/xunsearch-full-1.4.11/libevent-2.0.21-stable'
Makefile:857: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/xx/mnt/xunsearch-full-1.4.11/libevent-2.0.21-stable'
Makefile:1182: recipe for target 'install' failed
make: *** [install] Error 2
-----
ERROR: failed to compile libevent, see 'setup.log' for more detail

有如下三步解决方案: 本地安装最新的libevent + openssl,然后去掉setup.shlibevent的安装步骤

apt-get install libevent-2.0-5 libevent-dev libevent-openssl-2.0-5

去掉脚本中需要安装的libevent

if test "$do_install" = "no" ; then
  echo "Extracting libevent package ..."
  tar -xjf $new_file
  cd libevent-$new_version
  echo "Configuring libevent ..."
  ./configure --prefix=$prefix >> ../setup.log 2>&1
  if test $? -ne 0 ; then
    setup_abort "configure libevent"
  fi
  echo "Compiling & installing libevent ..."
  make clean >> ../setup.log 2>&1
  make $mk_add_option install >> ../setup.log 2>&1
  if test $? -ne 0 ; then
    setup_abort "compile libevent"
  fi
  cd ..
fi

去掉prefix --with-libevent

tar -xjf $new_file
cd xunsearch-$new_version
echo "Configuring xunsearch ..."
./configure --prefix=$prefix --with-scws=$prefix $xs_add_option \
--with-xapian=$prefix >> ../setup.log 2>&1
if test $? -ne 0 ; then
  setup_abort "configure xunsearch"
fi

0 comments

To reply to the article, please Login or registered