question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error relocating /usr/lib/libheif.so.1: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found

See original GitHub issue

Out of nowhere my node process started crashing while nothing has changed, I just rebuilt the image. I’m using sharp on an Alpine Docker image that’s running on ARM, this used to work fine when I built this image a month or 2 back but now the process crashes with the following whenever Sharp is invoked.

node_1   | Something went wrong installing the "sharp" module
node_1   | 
node_1   | Error relocating /usr/lib/libheif.so.1: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found
node_1   | 
node_1   | - Remove the "node_modules/sharp" directory, run "npm install" and look for errors
node_1   | - Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
node_1   | - Search for this error at https://github.com/lovell/sharp/issues

Screenshot 2019-11-22 at 13 30 07

My Docker image looks like this:

FROM arm32v6/node:12-alpine
WORKDIR /code

COPY ./package.json ./
COPY ./yarn.lock ./
COPY ./.next ./.next
COPY ./public ./public
COPY ./config.js ./next.config.js
COPY ./qemu-arm-static /usr/bin/qemu-arm-static
RUN apk add vips-dev build-base --upgrade --no-cache \
    --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/ \
    --repository https://alpine.global.ssl.fastly.net/alpine/edge/main
RUN yarn --production

FROM arm32v6/node:12-alpine
WORKDIR /code

COPY --from=0 /code /code
COPY ./qemu-arm-static /usr/bin/qemu-arm-static
RUN apk add vips --upgrade --no-cache \
    --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/ \
    --repository https://alpine.global.ssl.fastly.net/alpine/edge/main && \
    rm /usr/bin/qemu-arm-static

EXPOSE 3000

CMD ["npm", "start"]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, Nov 26, 2019

This recent commit in Alpine Linux aports is relevant:

https://github.com/alpinelinux/aports/commit/2f6bc1cb9b406078ebc8e9621231a50159680dd9

The issues linked to in the commit message are not relevant to either libvips or libheif and I cannot find any other PR or approval process for this change.

The user who made the change appears to have been recently granted permission to commit directly to the master branch of Alpine Linux aports:

https://github.com/alpinelinux/aports/commits?author=maxice8

0reactions
maxice8commented, Nov 27, 2019

Someone asked me about this on the gitlab.a.o instance’s issue. Response

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error relocating - building docker-fpm-alpine image
Trying to create an image (from a working ...
Read more >
python3.6.5 upgrade pip says [Error relocating /usr/lib/libexpat ...
When I run pip3 it breaks with this error `ImportError: Error relocating /usr/lib/libexpat.so.1: getrandom: symbol not found`. The circumstances are the same as ......
Read more >
1926567 – Can't enter a container based on an Alpine image
Description of problem: Failed to enter a created toolbox container and got error ... symbol not found Error relocating /usr/bin/toolbox: ...
Read more >
Error relocating: Symbol not found - Superhero Ninja
Error relocating : Symbol not found. I was running a container from linuxserver.io, which is based on Alpine linux. While this container ran...
Read more >
Failed to load NIF library, symbol not found for libpostal
... load NIF library: \'Error relocating /foobar/_build/dev/lib/expostal/priv/expostal.so: libpostal_setup_parser: symbol not found\''}}}, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found