# rookie in mediasoup

**URL:** <https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196>\
**Category:** mediasoup libraries\
**Created:** [April 28, 2023, 2:48am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196 "2023-04-28T02:48:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![yygqlxh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yygqlxh/32/2158_2.png) [@yygqlxh](https://mediasoup.discourse.group/u/yygqlxh)\
**Post date:** [April 28, 2023, 2:48am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/1 "2023-04-28T02:48:49Z")

</div>

I am a student who knew when learning webrtc that it was necessary to build a media server to facilitate multi person video calls. However, I encountered many problems when deploying and building mediasoup.The current progress is only achieved for creating a new folder. I wonder if there is any senior who can provide guidance

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [April 28, 2023, 6:22am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/2 "2023-04-28T06:22:44Z")

</div>

Welcome to this community.

What are the problems you are facing?

What do you mean by this?:

> [@yygqlxh](#):
>
> The current progress is only achieved for creating a new folder

Kindly make sure you have gone through documentation properly and understood how things connect to serve the call.

After that if you face specific issues then there are plenty of topics in this platform, you can search them.

If your issue is not listed here or you are not able to resolve the issue for some other reasons then feel free to create a topic for that specific topic.

---

<div class="post-metadata">

**Author:** ![yygqlxh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yygqlxh/32/2158_2.png) [@yygqlxh](https://mediasoup.discourse.group/u/yygqlxh)\
**Post date:** [April 28, 2023, 7:04am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/3 "2023-04-28T07:04:59Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/e/e7d2f7431682e40546e05996cf034566851db494.png)

In fact, I encountered many problems when I was NPM mediasoup. Although these types of problems are not technical, they are necessary for me to overcome, so I need a senior to provide some guidance

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [April 28, 2023, 7:20am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/4 "2023-04-28T07:20:27Z")

</div>

Kindly share the full logs, this is just the last part of it, doesn’t show much.

Make sure you have installed the prerequisites for mediasoup:

> **[mediasoup :: Installation](https://mediasoup.org/documentation/v3/mediasoup/installation/)**
>
> Cutting Edge WebRTC Video Conferencing

---

<div class="post-metadata">

**Author:** ![yygqlxh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yygqlxh/32/2158_2.png) [@yygqlxh](https://mediasoup.discourse.group/u/yygqlxh)\
**Post date:** [April 29, 2023, 4:00am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/5 "2023-04-29T04:00:07Z")

</div>

I’m sorry for replying so late. Yesterday, I watched some videos learning the entire process of mediasoup. After seeing your reply this morning, I reconfigured my virtual machine according to the Installation, hoping for good news

---

<div class="post-metadata">

**Author:** ![yygqlxh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yygqlxh/32/2158_2.png) [@yygqlxh](https://mediasoup.discourse.group/u/yygqlxh)\
**Post date:** [April 29, 2023, 5:14am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/6 "2023-04-29T05:14:28Z")

</div>

npm ERR! code 1  
npm ERR! git dep preparation failed  
npm ERR! command /usr/bin/node /usr/lib/node\_modules/npm/bin/npm-cli.js install --force --cache=/home/lxh/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run  
npm ERR! \> mediasoup@3.11.24 postinstall  
npm ERR! \> node npm-scripts.js postinstall  
npm ERR!  
npm ERR! npm-scripts.js [INFO] running task “postinstall”  
npm ERR! npm-scripts.js [INFO] buildWorker()  
npm ERR! npm-scripts.js [INFO] executeCmd(): make -C worker  
npm ERR! make: Entering directory ‘/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker’  
npm ERR! # Updated pip and setuptools are needed for meson.  
npm ERR! # `--system` is not present everywhere and is only needed as workaround for  
npm ERR! # Debian-specific issue (copied from [Without --system build fails by sac · Pull Request #33 · gluster/gstatus · GitHub](https://github.com/gluster/gstatus/pull/33)),  
npm ERR! # fallback to command without `--system` if the first one fails.  
npm ERR! python3.9 -m pip install --system --target=/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip pip setuptools ||   
npm ERR! python3.9 -m pip install --target=/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip pip setuptools ||   
npm ERR! echo “Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package”  
npm ERR! Collecting pip  
npm ERR! Using cached pip-23.1.2-py3-none-any.whl (2.1 MB)  
npm ERR! Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package  
npm ERR! # Install `meson` and `ninja` using `pip` into custom location, so we don’t  
npm ERR! # depend on system-wide installation.  
npm ERR! python3.9 -m pip install --upgrade --target=/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip meson==0.61.5 ninja==1.10.2.4  
npm ERR! Collecting meson==0.61.5  
npm ERR! Using cached meson-0.61.5-py3-none-any.whl (862 kB)  
npm ERR! Collecting ninja==1.10.2.4  
npm ERR! Using cached ninja-1.10.2.4-py2.py3-none-manylinux\_2\_5\_x86\_64.manylinux1\_x86\_64.whl (120 kB)  
npm ERR! Installing collected packages: ninja, meson  
npm ERR! Successfully installed meson-0.61.5 ninja-1.10.2.4  
npm ERR! /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/bin/meson setup   
npm ERR! --prefix /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/Release   
npm ERR! --bindir ‘’   
npm ERR! --libdir ‘’   
npm ERR! --buildtype release   
npm ERR! -Db\_ndebug=true   
npm ERR! -Db\_pie=true   
npm ERR! -Db\_staticpic=true   
npm ERR! --reconfigure   
npm ERR! “”   
npm ERR! /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/Release/build ||   
npm ERR! /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/bin/meson setup   
npm ERR! --prefix /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/Release   
npm ERR! --bindir ‘’   
npm ERR! --libdir ‘’   
npm ERR! --buildtype release   
npm ERR! -Db\_ndebug=true   
npm ERR! -Db\_pie=true   
npm ERR! -Db\_staticpic=true   
npm ERR! “”   
npm ERR! /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/Release/build  
npm ERR! The Meson build system  
npm ERR! Version: 0.61.5  
npm ERR! Source dir: /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker  
npm ERR! Build dir: /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/Release/build  
npm ERR! Build type: native build  
npm ERR! Project name: mediasoup-worker  
npm ERR! Project version: undefined  
npm ERR! C compiler for the host machine: cc (gcc 7.5.0 “cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0”)  
npm ERR! C linker for the host machine: cc ld.bfd 2.30  
npm ERR! C++ compiler for the host machine: c++ (gcc 7.5.0 “c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0”)  
npm ERR! C++ linker for the host machine: c++ ld.bfd 2.30  
npm ERR! Host machine cpu family: x86\_64  
npm ERR! Host machine cpu: x86\_64  
npm ERR!  
npm ERR! Executing subproject openssl  
npm ERR!  
npm ERR! openssl| Project name: openssl  
npm ERR! openssl| Project version: 3.0.7  
npm ERR! openssl| C compiler for the host machine: cc (gcc 7.5.0 “cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0”)  
npm ERR! openssl| C linker for the host machine: cc ld.bfd 2.30  
npm ERR! openssl| Run-time dependency threads found: YES  
npm ERR! openssl| Program as found: YES (/usr/bin/as)  
npm ERR! openssl| Message: OpenSSL is configured with ASM support  
npm ERR! openssl| Library dl found: YES  
npm ERR! openssl| Build targets in project: 3  
npm ERR! openssl| Subproject openssl finished.  
npm ERR!  
npm ERR! Downloading nlohmann\_json source from [https://github.com/nlohmann/json/releases/download/v3.10.5/include.zip](https://github.com/nlohmann/json/releases/download/v3.10.5/include.zip)  
npm ERR!  
npm ERR! meson.build:178:0: ERROR: Unhandled python exception  
npm ERR!  
npm ERR! This is a Meson bug and should be reported!  
npm ERR! Makefile:110: recipe for target ‘setup’ failed  
npm ERR! make: Leaving directory ‘/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker’  
npm ERR! npm WARN using --force Recommended protections disabled.  
npm ERR! npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead  
npm ERR!  
npm ERR! Usage:  
npm ERR! /usr/local/bin/python3.9 -m pip install [options] [package-index-options] …  
npm ERR! /usr/local/bin/python3.9 -m pip install [options] -r [package-index-options] …  
npm ERR! /usr/local/bin/python3.9 -m pip install [options] [-e] …  
npm ERR! /usr/local/bin/python3.9 -m pip install [options] [-e] …  
npm ERR! /usr/local/bin/python3.9 -m pip install [options] \<archive url/path\> …  
npm ERR!  
npm ERR! no such option: --system  
npm ERR! ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none)  
npm ERR! ERROR: No matching distribution found for setuptools  
npm ERR! Directory does not contain a valid build tree:  
npm ERR! /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/Release/build  
npm ERR! Traceback (most recent call last):  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/mesonmain.py”, line 148, in run  
npm ERR! return options.run\_func(options)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/msetup.py”, line 294, in run  
npm ERR! app.generate()  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/msetup.py”, line 185, in generate  
npm ERR! self.\_generate(env)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/msetup.py”, line 229, in \_generate  
npm ERR! intr.run()  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreter/interpreter.py”, line 2554, in run  
npm ERR! super().run()  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 148, in run  
npm ERR! self.evaluate\_codeblock(self.ast, start=1)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 173, in evaluate\_codeblock  
npm ERR! raise e  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 166, in evaluate\_codeblock  
npm ERR! self.evaluate\_statement(cur)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 181, in evaluate\_statement  
npm ERR! self.assignment(cur)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 566, in assignment  
npm ERR! value = self.evaluate\_statement(node.value)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 179, in evaluate\_statement  
npm ERR! return self.function\_call(cur)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/interpreterbase.py”, line 454, in function\_call  
npm ERR! res = func(node, func\_args, kwargs)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/decorators.py”, line 768, in wrapped  
npm ERR! return f(\*wrapped\_args, \*\*wrapped\_kwargs)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/decorators.py”, line 115, in wrapped  
npm ERR! return f(\*wrapped\_args, \*\*wrapped\_kwargs)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreterbase/decorators.py”, line 276, in wrapper  
npm ERR! return f(\*nargs, \*\*wrapped\_kwargs)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreter/interpreter.py”, line 800, in func\_subproject  
npm ERR! return self.do\_subproject(args[0], ‘meson’, kwargs)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/interpreter/interpreter.py”, line 841, in do\_subproject  
npm ERR! subdir = r.resolve(subp\_name, method)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/wrap/wrap.py”, line 334, in resolve  
npm ERR! self.get\_file()  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/wrap/wrap.py”, line 398, in get\_file  
npm ERR! path = self.get\_file\_internal(‘source’)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/wrap/wrap.py”, line 560, in get\_file\_internal  
npm ERR! self.download(what, cache\_path)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/wrap/wrap.py”, line 535, in download  
npm ERR! dhash, tmpfile = self.get\_data(srcurl)  
npm ERR! File “/home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm/worker/out/pip/mesonbuild/wrap/wrap.py”, line 486, in get\_data  
npm ERR! resp = urllib.request.urlopen(req, timeout=REQ\_TIMEOUT)  
npm ERR! File “/usr/local/lib/python3.9/urllib/request.py”, line 214, in urlopen  
npm ERR! return opener.open(url, data, timeout)  
npm ERR! File “/usr/local/lib/python3.9/urllib/request.py”, line 517, in open  
npm ERR! response = self.\_open(req, data)  
npm ERR! File “/usr/local/lib/python3.9/urllib/request.py”, line 534, in \_open  
npm ERR! result = self.\_call\_chain(self.handle\_open, protocol, protocol +  
npm ERR! File “/usr/local/lib/python3.9/urllib/request.py”, line 494, in \_call\_chain  
npm ERR! result = func(\*args)  
npm ERR! File “/usr/local/lib/python3.9/urllib/request.py”, line 1389, in https\_open  
npm ERR! return self.do\_open(http.client.HTTPSConnection, req,  
npm ERR! File “/usr/local/lib/python3.9/urllib/request.py”, line 1350, in do\_open  
npm ERR! r = h.getresponse()  
npm ERR! File “/usr/local/lib/python3.9/http/client.py”, line 1377, in getresponse  
npm ERR! response.begin()  
npm ERR! File “/usr/local/lib/python3.9/http/client.py”, line 320, in begin  
npm ERR! version, status, reason = self.\_read\_status()  
npm ERR! File “/usr/local/lib/python3.9/http/client.py”, line 281, in \_read\_status  
npm ERR! line = str(self.fp.readline(\_MAXLINE + 1), “iso-8859-1”)  
npm ERR! File “/usr/local/lib/python3.9/socket.py”, line 704, in readinto  
npm ERR! return self.\_sock.recv\_into(b)  
npm ERR! File “/usr/local/lib/python3.9/ssl.py”, line 1241, in recv\_into  
npm ERR! return self.read(nbytes, buffer)  
npm ERR! File “/usr/local/lib/python3.9/ssl.py”, line 1099, in read  
npm ERR! return self.\_sslobj.read(len, buffer)  
npm ERR! ConnectionResetError: [Errno 104] Connection reset by peer  
npm ERR! make: \*\*\* [setup] Error 2  
npm ERR! npm-scripts.js [ERROR] executeCmd() failed, exiting: Error: Command failed: make -C worker  
npm ERR! npm ERR! code 1  
npm ERR! npm ERR! path /home/lxh/.npm/\_cacache/tmp/git-clonefhxJQm  
npm ERR! npm ERR! command failed  
npm ERR! npm ERR! command sh -c node npm-scripts.js postinstall  
npm ERR!  
npm ERR! npm ERR! A complete log of this run can be found in: /home/lxh/.npm/\_logs/2023-04-29T04\_58\_19\_578Z-debug-0.log

npm ERR! A complete log of this run can be found in: /home/lxh/.npm/\_logs/2023-04-29T04\_57\_38\_789Z-debug-0.log

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [April 30, 2023, 10:00am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/7 "2023-04-30T10:00:10Z")

</div>

Delete the mediasoup folder in modules if it exists and try installation again after installing build-essential and python3-pip. Google how to install those for your distribution.

Assuming Node.JS and NPM is up to date and system is up to date; there should only be those two requirements missing for most Linux distributions. The link shared about on installation details this in the notes.

---

<div class="post-metadata">

**Author:** ![yygqlxh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yygqlxh/32/2158_2.png) [@yygqlxh](https://mediasoup.discourse.group/u/yygqlxh)\
**Post date:** [May 1, 2023, 7:54am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/8 "2023-05-01T07:54:37Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/b/b70771d587022bab3b48130219f4a210adeb3c88.png)  
What other tools do I need to install

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [May 1, 2023, 12:36pm UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/9 "2023-05-01T12:36:25Z")

</div>

> sudo apt update -y  
> sudo apt upgrade -y
> 
> curl -sL [https://deb.nodesource.com/setup\_16.x](https://deb.nodesource.com/setup_16.x) | sudo -E bash -
> 
> sudo apt install nodejs -y  
> sudo npm install -g npm@latest  
> sudo npm install pm2@latest -g  
> sudo apt-get install build-essential -y  
> sudo apt install python3-pip -y
> 
> npm install mediasoup@3  
> sudo reboot

This is all I need to run minimal to make Mediasoup work correctly on uBuntu. The PM2 is optional if you don’t use process managers. If the install failed and left mediasoup folder behind in modules; do remove it before installing again to avoid problems.

---

<div class="post-metadata">

**Author:** ![yygqlxh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yygqlxh/32/2158_2.png) [@yygqlxh](https://mediasoup.discourse.group/u/yygqlxh)\
**Post date:** [May 2, 2023, 7:48am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/10 "2023-05-02T07:48:11Z")

</div>

Thank you for your suggestion. I will try my best in the next few days

---

<div class="post-metadata">

**Author:** ![lightofpast](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@lightofpast](https://mediasoup.discourse.group/u/lightofpast)\
**Post date:** [May 9, 2023, 5:26pm UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/11 "2023-05-09T17:26:38Z")

</div>

Have you found any solution? Iam facing the same issue. All dependencies are installed

---

<div class="post-metadata">

**Author:** ![yygqlxh](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/yygqlxh/32/2158_2.png) [@yygqlxh](https://mediasoup.discourse.group/u/yygqlxh)\
**Post date:** [May 10, 2023, 10:01am UTC](https://mediasoup.discourse.group/t/rookie-in-mediasoup/5196/12 "2023-05-10T10:01:56Z")

</div>

not yet, recently I am busy with my study. maybe I will retry after a while
