【问题标题】:npm install error with kurento - dockerkurento 的 npm 安装错误 - docker
【发布时间】:2023-03-19 14:20:01
【问题描述】:

我正在尝试在 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 部分似乎有错误,有人帮我解决这个问题。

【问题讨论】:

标签: node.js linux docker npm-install kurento


【解决方案1】:

我可以跳过我之前收到的错误。

需要修改npm install命令如下:

npm install --unsafe-perm

所以我可以克服错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-30
    • 2012-02-09
    • 2022-01-10
    • 2016-04-03
    • 1970-01-01
    • 2020-08-28
    相关资源
    最近更新 更多