akhenakh / gozim

A Go native implementation for ZIM files
MIT License
205 stars 35 forks source link

undefined symbol: leveldb_free #35

Open rtens opened 5 years ago

rtens commented 5 years ago

Really cool project. Would love to server Wikipedia from an RPi.

I'm trying to run gozim in a Docker Container on a Raspberry Pi 3 B with Raspbian Strecht Lite.

Here is the Dockerfile

FROM kenntwasde/raspi-golang:latest
ENTRYPOINT []

RUN apt-get update && \
    apt-get -qy install wget liblzma-dev libleveldb-dev
WORKDIR /root/
RUN wget https://github.com/akhenakh/gozim/releases/download/v1.0/gozim-1.0-arm-linux.tar.gz
RUN tar -xvf gozim-*.tar.gz -C /usr/local/bin

CMD ["/bin/sh"]

To test it I used

docker build -t wikipedia .
wget http://download.kiwix.org/zim/wikipedia/wikipedia_en_100_2019-01.zim -P /tmp/wikipedia
docker run -ti -v /tmp/wikipedia:/tmp/wikipedia wikipedia

In the container shell, I execute

gozimindex -path=/tmp/wikipedia/wikipedia_en_100_2019-01.zim -index=/tmp/wikipedia/wikipedia_en_100_2019-01.idx

which outputs

[custom] [cjk standard simple keyword en]

but when I now try to start the web server in the container shell with

gozimhttpd -path=/tmp/wikipedia/wikipedia_en_100_2019-01.zim -index=/tmp/wikipedia/wikipedia_en_100_2019-01.idx

I get the error

2019/02/12 23:16:12 Found indexes
gozimhttpd: symbol lookup error: gozimhttpd: undefined symbol: leveldb_free

Anyone can reproduce this and has any idea what causes the error?

Thanks.

akhenakh commented 5 years ago

This is related to the leveldb symbols which may have changed since I've built the 1.0 release. I'll build a newer soon.

funkboxing commented 3 years ago

I think I'm running into an issue with leveldb also. Trying to run on a raspi zero (buster) and I'm getting "error while loading shared libraries: libleveldb.so.1: cannot open shared object file: No such file or directory". If you have time to make a new build I'd really appreciate it.