Skip to content

/lib64/libc.so.6: version 'GLIBC_2.18' not found on Lambda #35

Closed
@chrg1001

Description

@chrg1001

Maybe this repository is not the right place to raise this issue.

I am using rust-serverless/serverless-rust with this repo's docker image to deploy my rust project to lambda.

It was successfully deployed , but I got this error at runtime. (the same issue on awslabs/aws-lambda-rust-runtime/issues/17 )

/var/task/bootstrap: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /var/task/bootstrap)

When I checked the Lambda runtime setting on the AWS Console, it was set to ”Custom runtime".

image

I changed the Runtime setting to "Custom runtime on Amazon Linux 2" directly on the AWS Console, and it worked fine.

image

Is there any way to set this up for deploy timing?


Cargo.toml

[package]
name = "demo"
version = "0.1.0"
edition = "2021"

[dependencies]
tokio = { version = "1.14", features = ["macros"] }
lambda_http = "0.4"
lambda_runtime = "0.4"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
mongodb = "2.0"
once_cell = "1.8"
envy = "0.4"
futures = "0.3"

[[bin]]
name = "hello"
path = "src/bin/hello.rs"

serverless.yaml

service: demo

provider:
  name: aws
  runtime: rust
  memorySize: 128
  lambdaHashingVersion: 20201221
  stage: dev
  profile: demo
  region: ap-northeast-1

custom:
  rust:
    # flags passed to cargo
    # cargoFlags: '--features enable-awesome'
    # custom docker tag
    dockerTag: latest
    # custom docker image
    dockerImage: rustserverless/lambda-rust
package:
  individually: true
plugins:
  - serverless-rust
functions:
  hello:
    handler: demo.hello

package.json

{
  "name": "demo",
  "version": "0.0.1",
  "devDependencies": {
    "serverless": "^2.69.0",
    "serverless-rust": "^0.3.8"
  }
}

Environment

OS : Windows 11
Node version : 14.16.1
Serverless Framework Version : 2.69.0

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