gpt4 book ai didi

node.js - kurento - docker 的 npm 安装错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:45:33 25 4
gpt4 key购买 nike

我正在尝试在 Docker 容器中安装 kurento 媒体服务器和一个教程。

Kurento 媒体服务器安装指南:

http://doc-kurento.readthedocs.io/en/stable/installation_guide.html

Kurento 教程安装:(使用 node.js):

http://doc-kurento.readthedocs.io/en/stable/tutorials/node/tutorial-one2one.html

首先我尝试在 ubuntu 机器上安装相同的程序,手动执行每个命令以便我可以看到它工作正常。

但是当我尝试在 docker 容器中安装相同的内容时,它无法正常工作。

Dockerfile如下:

FROM ubuntu:14.04
MAINTAINER USER1 "USER1@infinte.com"
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q python-software-properties software-properties-common
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.1.0
RUN sudo service kurento-media-server-6.0 start
RUN sudo apt-get install build-essential -y
RUN apt-get install python2.7-dev -y
RUN apt-get update -y
RUN cd kurento-tutorial-node/kurento-one2one-call && sudo npm install
EXPOSE 8443

我收到如下错误:

npm install 命令期间发生错误。

Step 25 : RUN cd kurento-tutorial-node/kurento-one2one-call && npm install
---> Running in d8c66e73f94f

> utf-8-validate@1.1.0 install /kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

make: Entering directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/utf-8-validate/build'
npm WARN cannot run in wd ws@0.4.32 (node-gyp rebuild 2> builderror.log) || (exit 0) (wd=/kurento-tutorial-node/kurento-one2one-call/node_modules/kurento-client/node_modules/reconnect-ws/node_modules/websocket-stream/node_modules/ws)

> bufferutil@1.1.0 install /kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

make: Entering directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
make: Leaving directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/bufferutil/build'

> ws@0.4.32 install /kurento-tutorial-node/kurento-one2one-call/node_modules/kurento-client/node_modules/kurento-jsonrpc/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/kurento-client/node_modules/kurento-jsonrpc/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/kurento-client/node_modules/kurento-jsonrpc/node_modules/ws/build'
npm WARN cannot run in wd kurento-one2one-call@6.1.0 cd static && bower install (wd=/kurento-tutorial-node/kurento-one2one-call)
minimist@1.2.0 node_modules/minimist

似乎错误出在 node.js 部分,有人帮我解决了这个问题。

最佳答案

我可以忽略之前收到的错误。

需要更改npm install命令如下:

npm install --unsafe-perm

这样我就可以克服错误。

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

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