簡體   English   中英

kurento的npm安裝錯誤-docker

[英]npm install error with kurento - docker

我正在嘗試在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

所以我可以克服這個錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM