我在Docker上的Ubuntu 16.04安装了Python 3.6,使用了
ppa:jonathonf/python-3.6
存储库。现在,我想安装xapian以便与Python一起使用。我没有找到任何现成的软件包,所以我试图从源代码构建它。我将PYTHON3
和PYTHON3_LIB
参数设置为指向Python 3.6。在构建过程中,我遇到了以下错误:
ImportError: libxapian.so.30:无法打开共享对象文件:没有那个文件或目录。
我尝试了1.3.7和1.4.5版本的xapian,但都没有成功。
我该如何安装xapian?
以下是复现我的错误的Dockerfile:
FROM ubuntu:16.04
RUN apt-get update \
&& apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update \
&& apt-get install -y python3-pip docker.io python3.6 python3.6-dev software-properties-common \
python-software-properties build-essential wget unzip cmake python3-sphinx \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3.6 python
RUN python -m pip install --upgrade pip
# install xapian 1.4.5
RUN apt-get update && apt-get install -y curl uuid-dev zlib1g-dev
WORKDIR /root
RUN curl --silent --show-error --fail --next -O https://oligarchy.co.uk/xapian/1.4.5/xapian-core-1.4.5.tar.xz
RUN curl --silent --show-error --fail --next -O https://oligarchy.co.uk/xapian/1.4.5/xapian-bindings-1.4.5.tar.xz
RUN tar xvf xapian-core-1.4.5.tar.xz
RUN tar xvf xapian-bindings-1.4.5.tar.xz
WORKDIR /root/xapian-core-1.4.5
RUN ./configure && make && make install
WORKDIR /root/xapian-bindings-1.4.5
RUN ./configure PYTHON3=/usr/bin/python3.6 PYTHON3_LIB=/usr/lib/python3.6 --with-python3 && make && make install
RUN python -c "import xapian"