Need help installing mediasoup

Hello, i am trying to use mediasoup for a school assignment. But im getting an error. I have all the dependencies installed. glad if u help me.

System info:

  • archlinux 6.3.1-arch1-1 (64-bit)
  • python info: Python 3.11.3
  • gnu make: GNU Make 4.4.1 Built for x86_64-pc-linux-gnu
  • node : v19.9.0
  • pip info: pip 23.1.2 from /usr/lib/python3.11/site-packages/pip (python 3.11)
  • meson: 1.1.0
  • ninja: 1.11.1

Here is the “npm i mediasoup” log file:

It’s due to an old abseil library version used, which is incompatible with gcc 13.x. See this commit: absl/strings/internal/str_format/extension.h: add missing <stdint.h> … · abseil/abseil-cpp@36a4b07 · GitHub

Hello Sergey, thank you for your answer. I installed abseil-cpp package and tried it again but it is the same error. What should i do?

Mediasoup installation downloads particular versions of dependencies on the fly. The easiest workaround I believe is to make it use an older version of gcc. Another way is to modify meson’s wrap file for abseil in mediasoup-xxx.tgz (worker\subprojects\abseil-cpp.wrap) in hope that newer version of abseil is compatible with the current mediasoup source code, which may not necessarily be true. You may also open an issue at GitHub.

Unfortunately i dont know how can i tell the installation to use the older version of gcc. And the other option looks like a way to cause problems in the future

Well, you may try this.
Install mediasoup files without building mediasoup-worker: npm i mediasoup --ignore-scripts
Then go to the mediasoup directory: cd node_modules/mediasoup/
and start mediasoup-worker build: node npm-scripts.js worker:build
It will fail as before, but all temporary files will remain.
Open worker/subprojects/abseil-cpp-20211102.0/absl/strings/internal/str_format/extension.h and insert line #include <cstdint> between #include <cstddef> and #include <cstrings>.
Build the worker again: node npm-scripts.js worker:build
If this is the only problem with gcc-13, not just the first one, the command should complete successfully.
Run node npm-scripts.js postinstall to clean up temporary files.

Thank you for your answer Sergey, i did what you said and it worked. But i dont understand what the problem actually is. Is problem mediasoup or the abseil project?

Since mediasoup does not compile with gcc-13, because it uses outdated version of abseil, it’s the problem of mediasoup. It is not that pressing because most Linux distributions install older versions of gcc, but eventually it has to be fixed. This, as always in case of dependency update, will involve some testing to ensure that other changes in abseil accumulated for the past two years do not break anything.

By the way, for the reference, this change that is already present in more recent versions of abseil, and which you applyied manually to the older version used by mediasoup, is described in the following instruction: Porting to GCC 13 - GNU Project (see “Header dependency changes”, <cstdint>).

Please report issue in mediasoup GitHub.

1 Like

I reported the issue old version of abseil causes error during installation · Issue #1080 · versatica/mediasoup (

Yes, I’ve seen it. Will address when possible but we are very busy. I’d appreciate if others could do the effort in a PR.

Ongoing PR: [mediasoup-worker] Require C++17, Meson >= 1.1.0 and update subprojects by ibc · Pull Request #1081 · versatica/mediasoup · GitHub

However I’m having problems in some OS (explained in PR comments), so any help is welcome.