kantancoding / microservices-python

261 stars 161 forks source link

ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir --requirement /app/requirements.txt" did not complete successfully: exit code: 1 #31

Open ghost opened 1 year ago

ghost commented 1 year ago

I followed along till writing the Dockerfile and did the pip3 freeze but then when i ran the script, mysqlclient is creating problems and is interrupting the build process. I faced a similar issue during the initial stage too when you once did the localhost print statement but then, everything after that step went smooth until this error. Im using MacBook Air M1 (2020). Requesting your help. Thanks in advance!

ghost commented 1 year ago
Screenshot 2023-07-03 at 6 42 51 PM
tanlethanh commented 1 year ago

You can fix the error by including pkg-config when installing image

hkumar0132 commented 1 year ago

Adding --fix-missing to this command and retrying multiple times also works on MacOS

RUN apt-get update \ && apt-get install -y --no-install-recommends --no-install-suggests \ build-essential default-libmysqlclient-dev \ && apt-get -y --fix-missing install \ && pip install --no-cache-dir --upgrade pip

uzairjan commented 10 months ago

You can fix the error by including pkg-config when installing image

worked for me.

RUN apt-get update \ && apt-get install -y --no-install-recommends --no-install-suggests \ python3-dev default-libmysqlclient-dev build-essential pkg-config \ && pip install --no-cache-dir --upgrade pip