Home > Enterprise >  Error loading shared library libpython3.10.so.1.0
Error loading shared library libpython3.10.so.1.0

Time:01-23

I get the following error

Error loading shared library libpython3.10.so.1.0: No such file or directory (needed by /usr/bin/aws) Error relocating /usr/bin/aws: Py_BytesMain: symbol not found

when I'm trying to run the docker image.

this is the dockerfile -

FROM node:16.17.1-alpine

RUN apk update && apk add git openssh-client vim python3 py3-pip jq
RUN pip install awscli
RUN apk --purge -v del py-pip

RUN apk add --no-cache yarn

RUN rm /var/cache/apk/*

WORKDIR /app
COPY package*.json ./
COPY yarn.lock ./
yarn install --frozen-lockfile

COPY . .
RUN yarn build
EXPOSE 3000
CMD ["sh", "startup.sh"]

Please advise how I can resolve this error?

CodePudding user response:

The error came from one sh script which was called in CMD ["sh", "startup.sh"]. The script was outdated and was there by mistake, which caused the error.

CodePudding user response:

In the image you build, this library can be found in /usr/lib/libpython3.10.so.1.0. Try adding /usr/lib to LD_LIBRARY_PATH environment variable. Something like this:

ENV LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
  • Related