Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chrg1001 opened this issue Dec 14, 2021 · 2 comments
Closed

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

chrg1001 opened this issue Dec 14, 2021 · 2 comments

Comments

@chrg1001
Copy link

chrg1001 commented Dec 14, 2021

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

@chrg1001 chrg1001 changed the title /lib64/libc.so.6: version GLIBC_2.18' not found` on Lambda /lib64/libc.so.6: version 'GLIBC_2.18' not found on Lambda Dec 14, 2021
@zamazan4ik
Copy link

Not familiar enough with Serverless but for now seems like you need to configure somehow the right Runtime env during the deployment. This repo has nothing with your deploy process.

@chrg1001
Copy link
Author

chrg1001 commented Dec 14, 2021

@zamazan4ik Thanks for your reply.

I read the source code of rust-serverless/serverless-rust and found the solution for this.

"serverless-rust": "^0.3.8" uses original repo softprops/serverless-rust of rust-serverless/serverless-rust, and this issue has been fixed after v0.3.8 (this commit, not tagged).

In conclusion, the solution is updating package.json like below at the moment.

P.S.
Sorry, this is an unrelated issue to this repository.

{
  "name": "demo",
  "version": "0.0.1",
  "devDependencies": {
    "serverless": "^2.69.0",
    // The latest commit at this time
    "serverless-rust": "https://github.com/softprops/serverless-rust#d6686a6d1d3e6316afaf51c85002cf1cc9167292"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants