也许你会觉得 Linux 下的程序编译有什么可讲的呢,直接在 Linux 系统下执行一下 build 命令不就行了,还需要专门理解系统的编译过程和构建工具的使用吗?实际上,根据我多年的工作经验来看,理解项目的编译过程、熟悉各种构建工具的使用是非常有必要的。下面我就举几个例子,通过这几个例子,我想你就会对它们有一个深刻感悟了。
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.14.1" gyp WARN EACCES attempting to reinstall using temporary dev dir "/node_modules/medooze-media-server/.node-gyp" gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/node_modules/medooze-media-server/.node-gyp' gyp ERR! System Linux 3.10.0-693.2.2.el7.x86_64 gyp ERR! command "/usr/local/node/bin/node" "/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" gyp ERR! cwd /node_modules/medooze-media-server gyp ERR! node -v v10.14.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open '/package.json' npm WARN !invalid#1 No description npm WARN !invalid#1 No repository field. npm WARN !invalid#1 No README data npm WARN !invalid#1 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! medooze-media-server@0.81.1 install: `test -f build/Release/medooze-media-server.node || (node-gyp configure && node-gyp rebuild --jobs=max)` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the medooze-media-server@0.81.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-12-11T03_40_52_436Z-debug.log
2019-12-11
一支箭💯¹⁰²⁴
golang 版本的 编译后执行报 # github.com/notedit/media-server-go/wrapper /usr/local/lib/libsrtp2.a(hmac_ossl.o):在函数‘srtp_hmac_dealloc’中: hmac_ossl.c:(.text+0xd9):对‘HMAC_CTX_free’未定义的引用 /usr/local/lib/libsrtp2.a(hmac_ossl.o):在函数‘srtp_hmac_alloc’中: hmac_ossl.c:(.text+0x223):对‘HMAC_CTX_new’未定义的引用 collect2: error: ld returned 1 exit status
作者回复: 这你需要问五media-server-go 的作者哈
2019-10-29
一支箭💯¹⁰²⁴
Media-server-go这个项目有什么教程吗?
作者回复: 没有,你可以到网上搜索我的 mediasoup的课程
2019-10-29
Geek_bang
执行npm install medooze-media-server --save 有遇到这个问题嘛? npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@2.1.1 npm WARN enoent ENOENT: no such file or directory, open '/root/workspace/Medooze/test/package.json' npm WARN test No description npm WARN test No repository field. npm WARN test No README data npm WARN test No license field. npm ERR! Linux 4.15.0-20-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "medooze-media-server" "--save" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! path /root/workspace/Medooze/test/node_modules/.staging/@types/prop-types-51921f0d npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/root/workspace/Medooze/test/node_modules/.staging/@types/prop-types-51921f0d' -> '/root/workspace/Medooze/test/node_modules/tap/node_modules/@types/prop-types' npm ERR! enoent ENOENT: no such file or directory, rename '/root/workspace/Medooze/test/node_modules/.staging/@types/prop-types-51921f0d' -> '/root/workspace/Medooze/test/node_modules/tap/node_modules/@types/prop-types' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent
npm ERR! Please include the following file with any support request: npm ERR! /root/workspace/Medooze/test/npm-debug.log