如何在没有以下错误消息的情况下安装 ffmpeg-binaries? [英] How do I install ffmpeg-binaries without the following error message?

查看:37
本文介绍了如何在没有以下错误消息的情况下安装 ffmpeg-binaries?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装 ffmpeg-libraries,但是,每次都收到相同的错误消息.

I am trying to install ffmpeg-libraries, however, get the same error message every time.

我正在尝试为 discord.js 编写音乐机器人并需要 ffmpeg-libraries.我已经尝试重新安装 node.js(我使用的是当前的稳定版本).

I am trying to code a music bot for discord.js and require ffmpeg-libraries. I have tried reinstalling node.js (I am on the current stable version).

Louiss-MBP-2:backslashmoderation louisglen$ sudo npm i ffmpeg-binaries
Password:
lzma-native@3.0.8 install /Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native
node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build
node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v64-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/build'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64"
gyp ERR! cwd /Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64/lzma_native.node --module_name=lzma_native --module_path=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64/lzma_native.node --module_name=lzma_native --module_path=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64' (1)
npm WARN discord.js@11.4.2 requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN backslashmoderation@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lzma-native@3.0.8 install: `node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lzma-native@3.0.8 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!     /Users/louisglen/.npm/_logs/2019-01-19T07_20_01_082Z-debug.log
Louiss-MBP-2:backslashmoderation louisglen$ 

我希望能正确安装,但不会.

I would expect that installs correctly, however, does not.

推荐答案

我认为最新的 FFmpeg-binaries 可能存在错误,我安装了一个以前的版本,它对我有用.

I think it there might be errors with the latest FFmpeg-binaries, I installed a prev version and it worked for me.

$ npm i ffmpeg-binaries@3.2.2-3

这篇关于如何在没有以下错误消息的情况下安装 ffmpeg-binaries?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆