sebo-b / warp

Workspace Autonomous Reservation Program - a system to help you efficiently manage hybrid (assigned, hot-desks, etc) office space.
MIT License
139 stars 60 forks source link

error while loading shared libraries: libpcre.so.3 #30

Closed sgutermann closed 1 year ago

sgutermann commented 1 year ago

I just checked through the closed issues as well and the ReadMe one more time. However if I get it right, in order to testdrive I would just need to clone the repo and spin up the demo_compose.

Used a fresh debian VM. Got error.

warp-warp-demo-wsgi-1   | uwsgi: error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory

What am I missing?

87113 commented 1 year ago

I don't know why, but my collegue had the same trouble and he did that :

docker compose -f demo_compose.yaml up --force-recreate --build -d warp-demo-wsgi

sgutermann commented 1 year ago

Did not work for me on a fresh machine.

There seems to be a change in the Dockerfile at the beginning of the year, which I do not understand why it was made. However building it on a naked machine does not work anymore.

Quick fix from a collegue, simply install libpcre3 again on the running image not only the build image (drop it in right after line 41 in the Dockerfile.

So if you were running and building this thing before 2023 you probably DO NOT have any problems. If you are getting started fresh in 2023 you most likely will have this problem.

87113 commented 1 year ago

For informations:

If that could help!

87113 commented 1 year ago

He modified the Dockerfile too:

#COPY --from=compile-image /opt/warp/debs ./debs
#RUN dpkg -i debs/*.deb

# add two lines below 
RUN apt-get update
RUN apt-get install -y build-essential libpq-dev libpcre3 libpcre3-dev
sebo-b commented 1 year ago

Maybe Docker on Windows doesn't support bind mount... if so, you can comment RUN line and uncomment COPY&RUN lines in the following sections. This will increase image size by a few megabytes. Can you please check this:

# comment this line
# RUN \
    --mount=type=bind,from=compile-image,source=/opt/warp/debs,target=./debs \
    dpkg -i debs/*.deb
# uncomment the following lines
COPY --from=compile-image /opt/warp/debs ./debs
RUN dpkg -i debs/*.deb
# comment this line
# RUN \
    --mount=type=bind,from=compile-image,source=/opt/warp/wheel,target=./wheel \
    pip install --no-index wheel/*.whl
# uncomment the following lines
COPY --from=compile-image /opt/warp/wheel ./wheel
RUN pip install --no-index wheel/*.whl
sgutermann commented 1 year ago

I can not check that as I am running Ubuntu on the Laptop and in the VM I used for testing is Debian. I added on a fresh VM the above mentioned lines in the Dockerfile after line 41. I would rather have a few MB more and working than not :)

sebo-b commented 1 year ago

I assume that it is not a problem anymore and can be closed. Let me know if it is not.