Installation errors in preinstall.sh in node:14.17.6-alpine base container
sappusaketh opened this issue · 2 comments
sappusaketh commented
I get below error when trying to install the package please help
#12 115.2 In file included from /app/node_modules/aws-lambda-ric/deps/aws-lambda-cpp-0.2.6/src/backward.cpp:26:
#12 115.2 /app/node_modules/aws-lambda-ric/deps/aws-lambda-cpp-0.2.6/include/backward.h:238:22: fatal error: execinfo.h: No such file or directory
#12 115.2 238 | # include <execinfo.h>
#12 115.2 | ^~~~~~~~~~~~
#12 115.2 compilation terminated.
#12 115.2 make[2]: *** [CMakeFiles/aws-lambda-runtime.dir/build.make:89: CMakeFiles/aws-lambda-runtime.dir/src/backward.cpp.o] Error 1
#12 115.2 make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/aws-lambda-runtime.dir/all] Error 2
#12 115.2 make: *** [Makefile:130: all] Error 2
#12 116.4 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
#12 116.4 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
#12 116.4
#12 116.4 npm ERR! code ELIFECYCLE
#12 116.4 npm ERR! errno 2
#12 116.4 npm ERR! aws-lambda-ric@1.1.0 preinstall: `./scripts/preinstall.sh`
#12 116.4 npm ERR! Exit status 2
#12 116.4 npm ERR!
#12 116.4 npm ERR! Failed at the aws-lambda-ric@1.1.0 preinstall script.
#12 116.4 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#12 116.5
#12 116.5 npm ERR! A complete log of this run can be found in:
#12 116.5 npm ERR! /root/.npm/_logs/2021-09-23T00_43_48_633Z-debug.log
I have following packages installed
RUN apk add \
binutils-gold \
curl \
g++ \
gcc \
git \
gnupg \
libgcc \
libtool \
linux-headers \
automake \
make \
autoconf \
cmake \
openssh-client \
openssl \
python
thecodingwizard commented
Perhaps try installing libexecinfo-dev
?
My Dockerfile, which uses alpine 3.14 (some of these might not be necessary):
FROM alpine:3.14 as build-image
RUN apk --no-cache add \
g++ \
make \
cmake \
unzip \
curl-dev \
automake \
autoconf \
tar \
gzip \
libtool \
libexecinfo-dev \
python3 \
nodejs \
npm
sappusaketh commented
thanks libexecinfo-dev
did it