[英]/lib64/libm.so.6: version `GLIBC_2.27' not found - Error deploying latest gatsby app to Amazon Amplify
I am trying to deploy a website I just built with React to Amplify but I keep getting this error:我正在尝试部署我刚刚使用 React to Amplify 构建的网站,但我不断收到此错误:
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
This is the full message from amplify console:这是来自放大控制台的完整消息:
2022-11-29T03:46:43.053Z [INFO]: Now using node v18.0.0 (npm v)
2022-11-29T03:46:43.080Z [INFO]: Installing default global packages from /root/.nvm/default-packages...
2022-11-29T03:46:43.080Z [INFO]: npm install -g --quiet yarn@1.22.0
2022-11-29T03:46:43.082Z [WARNING]: node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
2022-11-29T03:46:43.083Z [WARNING]: Failed installing default packages. Please check if your default-packages file or a package in it has problems!
2022-11-29T03:46:43.084Z [INFO]: # Executing command: yarn install
2022-11-29T03:46:43.115Z [WARNING]: node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
2022-11-29T03:46:43.115Z [ERROR]: !!! Build failed
2022-11-29T03:46:43.116Z [ERROR]: !!! Non-Zero Exit Code detected
I have trying specifying the version of Node I want to use because gatsby require above v18.0.0 so my package.json looks as follow:我尝试指定我想使用的节点版本,因为 gatsby 要求高于 v18.0.0,所以我的 package.json 如下所示:
"engines" : {
"node" : ">=18.0.0" //
}
Any idea how can I fix it?知道我该如何解决吗?
here is also my build settings:这也是我的构建设置:
version: 1
frontend:
phases:
preBuild:
commands:
- nvm install 18.12.1
- yarn install
build:
commands:
- yarn run build
artifacts:
baseDirectory: public
files:
- '**/*'
cache:
paths:
- node_modules/**/*
Ran into the same error attempting to build a new application on AWS Amplify with GatsbyJS.尝试使用 GatsbyJS 在 AWS Amplify 上构建新应用程序时遇到相同的错误。 I tried installing the missing dependency,
glibc-devel
.我尝试安装缺少的依赖
glibc-devel
。 It is actually up-to-date per the core repositories but is still behind the proper release needed with this specific version of node.它实际上是每个核心存储库的最新版本,但仍落后于此特定版本的节点所需的正确版本。
I swapped over to the docker image for that version of node, and it worked just fine (specifically node:18.12
).我为那个版本的节点交换了 docker 图像,它工作得很好(特别是
node:18.12
)。 I left everything else default/auto-detected我将其他所有内容都保留为默认/自动检测
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.