ubuntu16.04安装python3.6操作_如何在Ubuntu16.04上用Python3.6安装xapian?

我使用ppa:jonathonf/python-3.6存储库在Docker上的Ubuntu16.04上安装了Python3.6。现在我想安装xapian,这样我就可以在Python中使用它了。我没有找到任何现成的包,所以我试图从源代码构建它。我设置了PYTHON3和PYTHON3_LIB参数以指向python3.6。在构建过程中,我得到以下错误:ImportError: libxapian.so.30: cannot open shared object file: No such file or directory

我尝试了xapian版本1.3.7和1.4.5,但运气不佳。在

如何安装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"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值