Skip to content
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

Illegal instruction (core dumped) #12

Closed
rabollig opened this issue Jan 25, 2023 · 2 comments
Closed

Illegal instruction (core dumped) #12

rabollig opened this issue Jan 25, 2023 · 2 comments
Labels
question Further information is requested

Comments

@rabollig
Copy link

This feels like it's a pretty generic error that might be due to something else... but I'll ask anyway.

Building a fresh environment with this Dockerfile:

FROM ubuntu:latest

RUN apt-get update && apt-get -y upgrade && apt-get -y  install curl && \ 
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \
    export NVM_DIR="$HOME/.nvm" && \
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
    [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" && \
   nvm install node && \ 
   npx -y avif # install avif

I get the following at the end of the procedure:

Downloading and installing node v19.5.0...
Downloading https://nodejs.org/dist/v19.5.0/node-v19.5.0-linux-x64.tar.gz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v19.5.0 (npm v9.3.1)
Creating default alias: default -> node (-> v19.5.0 *)
Illegal instruction (core dumped)

I've tried doing it step-by-step as well. NPM otherwise seems to be responding correctly, though I'm more of a PHP person and might be missing something really obvious.

What information might be helpful to further diagnose?

@lovell
Copy link
Owner

lovell commented Jan 25, 2023

Hi, you'll need to ensure the machine meets the prerequisites at https://sharp.pixelplumbing.com/install#prerequisites , which includes "CPU with SSE4.2".

What is the output of running npx envinfo --system within the container?

@lovell lovell added the question Further information is requested label Jan 25, 2023
@rabollig
Copy link
Author

Thanks! Yeah, it's a pretty old CPU...

  System:
    OS: Linux 4.4 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (2) x64 Pentium(R) Dual-Core  CPU      E6600  @ 3.06GHz
    Memory: 2.54 GB / 3.83 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash

I tried it on a modern MacBook and it works just fine.

I'll send a PR your way with a Dockerfile once it get it smooth.

It's quite amazing!

Thanks!

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

No branches or pull requests

2 participants