1

I am trying to install nodejs using the docker console for ubuntu but I get an error installing node js. This is the error I am getting

The command [/bin/sh -c ./configure && make && make install] returned a non-zero code: 127

This is part of my dockerfile

FROM ubuntu:12.04
RUN mkdir -p /dir/subdir
RUN apt-get update

# Install nodejs
ADD http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz /dir
WORKDIR /dir/node-v0.10.26-linux-x64
RUN ./configure && make && make install
WORKDIR /dir
6
  • Why don't you just install wget before RUN wget? Commented Jun 23, 2014 at 22:28
  • wget is already installed. I am not really that familiar with docker, Do I need to install it from my dockerfile? Commented Jun 23, 2014 at 22:33
  • 1
    wget needs to be installed inside of the container, not on your host machine. You should put the following before the wget line: RUN apt-get install -y wget. Commented Jun 23, 2014 at 22:54
  • I know this is unrelated to my original question but do you know what error code 2 means? it has to do with RUN cd/node ... ./config returned a non-zero code: 2 Commented Jun 23, 2014 at 23:05
  • 1
    You can also use ADD to download the source directly, instead RUN wget. Like ADD http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz /dir/ Commented Jun 24, 2014 at 10:04

1 Answer 1

3

Exit code 127 typically means "command not found". Chances are build-essentials are not installed.

Try adding the following after the apt-get update:

RUN apt-get -y install build-essential
Sign up to request clarification or add additional context in comments.

2 Comments

make sure all the prequisites are installed before trying to invoke the ./configurre && make && make install github.com/joyent/node/wiki/installation#prerequisites
what does (-y) mean?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.