-
Hi community,
Ya, I knew almost suggestion to update glibc version or i should re-compiled as per server version. But it is not easy in my case due to:
So, I want to ask if any solution to use Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Does |
Beta Was this translation helpful? Give feedback.
-
@rokm will know more about this than me but generally copying system libraries like |
Beta Was this translation helpful? Give feedback.
-
I don't think overriding the You'll either need to freeze on a machine whose |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response, appreciate it. I already resolved my situation by docker. So, if anyone encounter this issue, use docker is best solution. however, with new python in old OS, for example: 3.9 on stretch need to build your docker file manually. |
Beta Was this translation helpful? Give feedback.
-
Another strategy for bundling a newer version of Python that targets an older version of GLIBC is to use the Ubuntu Deadsnakes PPA to install a newer Python on an older Ubuntu. An example FROM ubuntu:18.04
RUN apt-get update && apt-get install -y software-properties-common binutils
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && apt-get install -y python3.9 python3.9-dev python3.9-venv
RUN python3.9 -m venv /venv --upgrade-deps
COPY main.py .
RUN export PATH=/venv/bin:$PATH; python -m pip install pyinstaller && \
pyinstaller --onefile main.py |
Beta Was this translation helpful? Give feedback.
@rokm will know more about this than me but generally copying system libraries like
glibc
rarely works. You're better off finding a Python built with a lowerglibc
requirement which in practice means building on an old version of Linux or an old docker image. cdrx/docker-pyinstaller is a bit out of date but is otherwise ideal for this.