server npm install error

vagrant@ubuntu2004:~/code/mediasoup/server$ npm install
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm ERR! code 1
npm ERR! path /home/vagrant/code/mediasoup/server/node_modules/mediasoup
npm ERR! command failed
npm ERR! command sh -c -- node npm-scripts.mjs postinstall
npm ERR! npm-scripts [INFO] [postinstall] skipping mediasoup-worker prebuilt download, building it locally
npm ERR! npm-scripts [INFO] [postinstall] buildWorker()
npm ERR! npm-scripts [INFO] [postinstall] executeCmd(): make -C worker
npm ERR! make: Entering directory '/home/vagrant/code/mediasoup/server/node_modules/mediasoup/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 https://github.com/gluster/gstatus/pull/33),
npm ERR! # fallback to command without `--system` if the first one fails.
npm ERR! /usr/bin/python3 -m pip install --system --target=/home/vagrant/code/mediasoup/server/node_modules/mediasoup/worker/out/pip pip setuptools || \
npm ERR!        /usr/bin/python3 -m pip install --target=/home/vagrant/code/mediasoup/server/node_modules/mediasoup/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! Looking in indexes: http://mirrors.aliyun.com/pypi/simple
npm ERR! Collecting pip
npm ERR!   Downloading http://mirrors.aliyun.com/pypi/packages/47/6a/453160888fab7c6a432a6e25f8afe6256d0d9f2cbd25971021da6491d899/pip-23.3.1-py3-none-any.whl (2.1 MB)
npm ERR! Collecting setuptools
npm ERR!   Downloading http://mirrors.aliyun.com/pypi/packages/bb/26/7945080113158354380a12ce26873dd6c1ebd88d47f5bc24e2c5bb38c16a/setuptools-68.2.2-py3-none-any.whl (807 kB)
npm ERR! Installing collected packages: pip, setuptools
npm ERR! Successfully installed pip-23.3.1 setuptools-68.2.2
npm ERR! # Install `meson` and `ninja` using `pip` into custom location, so we don't
npm ERR! # depend on system-wide installation.
npm ERR! /usr/bin/python3 -m pip install --upgrade --target=/home/vagrant/code/mediasoup/server/node_modules/mediasoup/worker/out/pip  meson==1.2.1 ninja==1.10.2.4
npm ERR! Looking in indexes: http://mirrors.aliyun.com/pypi/simple
npm ERR! Collecting meson==1.2.1
npm ERR!   Using cached http://mirrors.aliyun.com/pypi/packages/e5/74/a1f1c6ba14e11e0fb050d2c61a78b6db108dd38383b6c0ab51c1becbbeff/meson-1.2.1-py3-none-any.whl (962 kB)
npm ERR! Collecting ninja==1.10.2.4
npm ERR!   Using cached http://mirrors.aliyun.com/pypi/packages/48/d2/5c106c854b0f2366679747b2a9c5377cc59e03e2b80d72e41588d143abbc/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-1.2.1 ninja-1.10.2.4
npm ERR! make: Leaving directory '/home/vagrant/code/mediasoup/server/node_modules/mediasoup/worker'
npm ERR! ERROR: Exception:
npm ERR! Traceback (most recent call last):
npm ERR!   File "/home/vagrant/code/mediasoup/server/node_modules/mediasoup/worker/out/pip/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
npm ERR!     status = run_func(*args)
npm ERR!   File "/home/vagrant/code/mediasoup/server/node_modules/mediasoup/worker/out/pip/pip/_internal/cli/req_command.py", line 245, in wrapper
npm ERR!     return func(self, options, args)
npm ERR!   File "/home/vagrant/code/mediasoup/server/node_modules/mediasoup/worker/out/pip/pip/_internal/commands/install.py", line 510, in run
npm ERR!     self._handle_target_dir(
npm ERR!   File "/home/vagrant/code/mediasoup/server/node_modules/mediasoup/worker/out/pip/pip/_internal/commands/install.py", line 565, in _handle_target_dir
npm ERR!     shutil.rmtree(target_item_dir)
npm ERR!   File "/usr/lib/python3.8/shutil.py", line 722, in rmtree
npm ERR!     onerror(os.rmdir, path, sys.exc_info())
npm ERR!   File "/usr/lib/python3.8/shutil.py", line 720, in rmtree
npm ERR!     os.rmdir(path)
npm ERR! OSError: [Errno 26] Text file busy: '/home/vagrant/code/mediasoup/server/node_modules/mediasoup/worker/out/pip/bin'
npm ERR! make: *** [Makefile:102: meson-ninja] Error 2
npm ERR! npm-scripts [ERROR] [postinstall] executeCmd() failed, exiting: Error: Command failed: make -C worker

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2023-10-26T01_41_02_932Z-debug-0.log

The problem has been solved, I replaced the system with Debian11, the installation was successful twice, the ubuntu system has environmental problems, the same command, produced different results.

sudo su

curl -sL https://deb.nodesource.com/setup_16.x | bash -

sudo apt-get update

sudo apt-get install -y net-tools nodejs build-essential python3 python3-pip valgrind

npm install