Debian 9 fails compiled : You need to install gyp in deps/gyp first

Hi,
I remember I got that issue before:

make : on entre dans le répertoire « /node_modules/mediasoup/worker »
/usr/bin/python2 ./scripts/configure.py -R mediasoup-worker
You need to install gyp in deps/gyp first, run:
./scripts/get_dep.sh gyp
Makefile:23 : la recette pour la cible « Release » a échouée
make: *** [Release] Erreur 42
make : on quitte le répertoire « /node_modules/mediasoup/worker »

Python 2.7.13 installed
build-essential : installed

I looked for these files on server and I could not find them
get_dep.sh
configure.py

Any idea ?

My little contribution to MS:

Solved with

npm install -g node-gyp; before installing

I don’t know what you are exactly doing but you don’t need node-gyp to install mediasoup. The installation requirements are clearly explained in the website. Nothing else is needed.

You are right: this did not help today (on a NEW OVH server debian 9.4)
Still the SAME error

make: Entering directory ‘/home/krglobal/node/node_modules/mediasoup/worker’
/usr/bin/python2 ./scripts/configure.py -R mediasoup-worker
Error: you need to install gyp in deps/gyp first, run:
./scripts/get-dep.sh gyp
Makefile:23: recipe for target ‘default’ failed
make: *** [default] Error 42

Just in case:

  1. What is the content of /home/krglobal/node/node_modules/mediasoup/worker/deps/gyp/?
  2. Does you host satisfy installation requirements?: https://mediasoup.org/documentation/v3/mediasoup/installation/#linux-osx-and-any-nix-system
  3. Which exact versions?

Debian 9.4, node 13.12

Setting that

PYTHON=python3 npm install mediasoup@2 --save

Allowed me to install v3 (I had python 2.7 by default)

Great

However, still got issue with v2

PYTHON=python3 npm install mediasoup@3 --save

Gives
File “./scripts/configure.py”, line 13, in
raise RuntimeError('gyp requires Python 2, but this is Python ’ + str(version) + ', ensure your python2 or python command points to the Python 2 executable

python --version
Python 2.7.13

python2 --version
Python 2.7.13

(This is really totally blank dedicated ovh server with no installation at all)

which v2 you mean? mediasoup v2 or python v2?

Sorry: my mistake.
No one of these works

PYTHON=python3 npm install mediasoup@2 --save

PYTHON=python2 npm install mediasoup@2 --save

PYTHON=python2.7.17 npm install mediasoup@2 --save

PYTHON=python npm install mediasoup@2 --save

npm install mediasoup@2 --save

The mediasoup v2 documentation clearly says that it requires Python 2:

  • Python 2 (python2 or python command must point to the Python 2 executable)

I don’t know why you are setting such a PYTHON env variable. That is not implemented in v2 but just in v3.

No idea why it fails. It clearly works for me in Debian 8 with Python 2.7.13. Honestly no idea. Please try to move to mediasoup v3, there is zero reason to use v2 nowadays.

Maybe it is messing some python3 and python2.
I use v2 beacuse I have some app made in v2.
(you know how hard it is to find someone with MS knowledge)

I know I took you a lot of time with my complains about complexity of MS.

Maybe one day, you will get rid of this complexity (like removing transports layer from you app and let people just publish and subscribe to streams. I guess we will get rid of the Covid19 before this miracle happens…)

That won’t happen. mediasoup is los level and you need to create a transport before being able to “publish” a stream on that transport.

Well, it looks like you got rid of “peers” in v2 .

Who knows maybe in v5 you will offer a high level API for dummy developers that will massively start using your solution.

Something like peerjs for instance…

Thanks for all your time.

If we eventually go for mediasoup v4 (not planned at all for now), it will be more low level than v3. And v5 will be more low level than v4. For sure. We are not interested in having massive “dummy” developers.

If anyone like me still gets this error somehow even if you have python 2 and python 3 on your machine, it could be fixed by installing python-dev.