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

我正在尝试在Docker容器中安装一个kurento webserver。

并试图执行kurento一对一的调用教程。

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

步:

运行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 

有人帮助我解决这个错误。

标准Ubuntu 14.04包中的节点版本相当旧(0.10)。 改为使用nodejs 网页上的安装说明。

您也可以select从节点图像构build容器,然后在其上安装Kurento和kurento一对一教程。 但是,考虑到在容器中运行多个进程可能很麻烦并且容易出错。 特别是当一些进程作为服务运行时。 官方的Docker文档中有关于如何使用Supervisor来实现的说明。