npm安装错误与docker - kurento应用程序

时间:2016-08-04 12:24:36

标签: node.js docker npm kurento

我正在尝试在docker容器中安装kurento webserver。

尝试执行kurento一对一调用教程。

我在npm安装步骤中收到错误。

步骤:

RUN cd kurento-tutorial-node / kurento-one2one-call&& npm install

错误如下:

> node-gyp rebuild

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:63:16)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at Object.oncomplete (fs.js:108:15)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.46
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

有人帮助我。

Docker文件如下:

FROM ubuntu:14.04
MAINTAINER USER1 "muraliselva.10@gmail.com"
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update
RUN apt-get install wget -y
RUN apt-get install git -y
RUN apt-get install curl -y
RUN echo "deb http://ubuntu.kurento.org trusty kms6" | sudo tee /etc/apt/sources.list.d/kurento.list
RUN wget -O - http://ubuntu.kurento.org/kurento.gpg.key | sudo apt-key add -
RUN apt-get update -y
RUN apt-get install kurento-media-server-6.0 -y
RUN sudo service kurento-media-server-6.0 start
RUN sudo service kurento-media-server-6.0 stop
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN sudo apt-get install -y nodejs -y
RUN sudo npm install -g bower -y
RUN git clone https://github.com/Kurento/kurento-tutorial-node.git
RUN cd kurento-tutorial-node/kurento-one2one-call && pwd
RUN cd kurento-tutorial-node/kurento-one2one-call && git checkout 6.5.0
RUN sudo service kurento-media-server-6.0 start
RUN cd kurento-tutorial-node/kurento-one2one-call && npm install
EXPOSE 8443

有人帮我修复错误。

1 个答案:

答案 0 :(得分:2)

标准Ubuntu 14.04软件包中的节点版本很旧(0.10)。请使用nodejs web page中的安装说明。

您还可以选择从node image构建容器,然后在其上安装Kurento和kurento一对一教程。但是,请注意在容器中运行多个进程可能很麻烦并且容易出错。特别是当某些进程作为服务运行时。有关如何使用Supervisor实现该目标的官方Docker文档中有说明。