Closed
Description
Awesome project 👍
Before all I must say that I'm not directly using your pre-build releases. So feel free to close this issue if you think it's not adequate.
I've copy/pasted your repository and adapted it for my needs but I'm getting the following runtime errors when running my Lambda:
/var/task/main: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /var/task/main)
/var/task/main: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /var/task/main)
What could be wrong?
This is my install script:
SHARP_VERSION="0.33.2"
echo ""
echo "Install and compile sharp v${SHARP_VERSION} for AWS Lambda Linux AMI environment"
# Install and compile Sharp for the AWS Lambda Linux AMI environment.
# Tells to explicitly install libvips in node_modules instead of using global libvips
SHARP_IGNORE_GLOBAL_LIBVIPS=1 \
npm install sharp@${SHARP_VERSION} \
--save=false \
--os=linux \
--cpu=arm64 \
--libc=glibc
# Remove musl-based binary
rm -rf ./node_modules/@img/*-linuxmusl*
And my build script:
# Build sharp using ESBuild
./node_modules/.bin/esbuild \
--bundle ./node_modules/sharp/ \
--outfile=index.js \
--minify \
--format=cjs \
--platform=node
# Move index.js
mkdir -p ./dist/nodejs/node_modules/sharp/lib
mv index.js ./dist/nodejs/node_modules/sharp/lib/
# Copy
cp -a node_modules/sharp/package.json ./dist/nodejs/node_modules/sharp/
cp -a node_modules/sharp/LICENSE ./dist/nodejs/node_modules/sharp/
cp -a node_modules/@img ./dist/nodejs/node_modules/
I'm running everything using GitHub Actions using ubuntu-22.04
the same as you.
Along with actions/setup-node@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
Is it because I'm building using ubuntu-22.04
that uses libc6-dev
version 2.35
? 🤔
Name | Version |
---|---|
libc++-dev | 1:14.0-55~exp2 |
libc++abi-dev | 1:14.0-55~exp2 |
libc6-dev | 2.35-0ubuntu3.6 |
libcurl4 | 7.81.0-1ubuntu1.15 |
You are using the same ubuntu-22.04
so how is it working for you? 🤔 (is it?)
Metadata
Metadata
Assignees
Labels
No labels