gpt4 book ai didi

node.js - docker npm安装错误-Kurento应用

转载 作者:行者123 更新时间:2023-12-02 21:25:48 25 4
gpt4 key购买 nike

我正在尝试在Docker容器中安装Kurento Web服务器。

并尝试执行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 web page的安装说明。

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

关于node.js - docker npm安装错误-Kurento应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38767270/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com