Skip to content

File too short on shared library libpcre2-8.so.0 #21

Description

@fongie

Hi!

I am trying to run git with this layer in a SAM lambda build.

Template snippet:

LambdaFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: src/
      Handler: app.lambda_handler
      Runtime: python3.7
      Layers:
        - arn:aws:lambda:eu-west-1:553035198032:layer:git:10

Code snippet:

subprocess.call(['git', 'init', '/tmp/Apps/CDN/'])

or

os.system('cd /tmp/Apps/CDN && git init')

All attempts fail with git: error while loading shared libraries: /opt/lib/libpcre2-8.so.0: file too short

I also tried using the second version of the layer (despite py3.7 not being listed for it) instead, but that also fail with the same error.

Any ideas how this can be solved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions