github-action icon indicating copy to clipboard operation
github-action copied to clipboard

libc.musl-x86_64.so.1: cannot open shared object file:

Open sergiors opened this issue 2 years ago • 3 comments

Hi, recently I added the following workflow to my project:

name: Deploy main branch

on:
  push:
    branches:
      - main

jobs:
  deploy:
    name: deploy
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x]
    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
      - name: Install Plugin and Deploy
        uses: serverless/github-action@v3
        with:
          args: -c "serverless plugin install --name serverless-python-requirements && serverless deploy --stage prod --verbose"
          entrypoint: /bin/sh
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

The functions that have pydantic as a dependency, suddenly throw the following error:

Unable to import module 'http_api.sign_up.app': libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):

If I deploy from my computer, the function works fine.

Does anyone have any idea what the heck happened?

sergiors avatar Jun 02 '22 17:06 sergiors

Let me know if this happens with uses: serverless/[email protected] too

DavideViolante avatar Jun 03 '22 10:06 DavideViolante

Let me know if this happens with uses: serverless/[email protected] too

@DavideViolante I did not run it, because lambda does not support python 3.10 yet

sergiors avatar Sep 29 '22 23:09 sergiors

I solved the problem using the following action:

name: Deploy main branch

on:
  push:
    branches:
      - main

jobs:
  deploy:
    name: deploy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: "3.9"
      - run: curl -sSL https://install.python-poetry.org | python3 -
      - uses: actions/setup-node@v3
        with:
          node-version: 16
      - run: npm install
      - run: npx serverless deploy --stage dev
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

sergiors avatar Sep 30 '22 00:09 sergiors