discordjs / opus

Native opus bindings for node
MIT License
192 stars 55 forks source link

Can't install it on my raspberry pi 3 b+ #117

Closed Imisuuu closed 2 years ago

Imisuuu commented 2 years ago

When I'm trying to install it on my rpi via npm I get this error Is there a fix?

npm ERR! code 126
npm ERR! path /home/pi/Desktop/sonata_music/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! sh: 1: node-pre-gyp: Permission denied

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2022-01-11T17_18_58_837Z-debug.log

Further details:

iim-ayush commented 2 years ago

I guess run npm i @discordjs/opus with sudo access. [ Final Code sudo npm i @discordjs/opus ]

Imisuuu commented 2 years ago

I guess run npm i @discordjs/opus with sudo access. [ Final Code sudo npm i @discordjs/opus ]

Tried it and it didn't work.

Breeze-ui commented 2 years ago

Same issue, any updates? :(

skemp117 commented 2 years ago

I'm having similar problems on the pi zero W. sudo doesn't work. Here is a log file of the failure to install. 2022-02-05T15_07_14_342Z-debug.log

adremides commented 2 years ago

I'm having similar problems on the pi zero W. sudo doesn't work. Here is a log file of the failure to install. 2022-02-05T15_07_14_342Z-debug.log

How is that similar to OP issue? OP is getting "Permission denied" error (probably because node-pre-gyp didn't have the +x permission) and you have errors during compilation.

The error you have is somehow related to the architecture of the Pi Zero, I guess. If you read the log:

warning: passing argument 1 of ‘_celt_autocorr’ from incompatible pointer type [-Wincompatible-pointer-types] note: expected ‘const opus_val16 ’ {aka ‘const float ’} but argument is of type ‘const opus_int16 ’ {aka ‘const short int ’} note: expected ‘opus_val32 ’ {aka ‘float ’} but argument is of type ‘opus_int32 ’ {aka ‘int ’} warning: passing argument 1 of ‘celt_pitch_xcorr_c’ from incompatible pointer type [-Wincompatible-pointer-types]

Although these are warnings, it seems something doesn't like to the compiler.

Maybe you can tell us which OS is used and verify which build tools are you using to build it.