【问题标题】:npm install error with docker - kurento applicationdocker 的 npm 安装错误 - kurento 应用程序
【发布时间】:2016-08-31 18:49:07
【问题描述】:

我正在尝试在 docker 容器中安装 kurento 网络服务器。

并尝试执行 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

有人帮我修复错误。

【问题讨论】:

  • 你已经试过这个solution了吗?
  • 这似乎是windows的解决方案..这里是Ubuntu ..

标签: node.js docker npm kurento


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    • 2018-07-10
    • 2020-01-28
    • 1970-01-01
    • 2014-04-25
    • 2023-03-30
    • 2022-10-24
    相关资源
    最近更新 更多