简体   繁体   中英

Getting error installing nodejs when building from docker

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM