Fail to install mediasoup on centos and the error is rare

I have been trying to install mediasoup@3 on centos but keep getting this error:

meson.build:163:0: ERROR: 
WrapDB connection failed to 
https://wrapdb.mesonbuild.com/v2/openssl_3.0.2-1/get_patch 
with error <urlopen error EOF occurred in violation of protocol (_ssl.c:1108)>

I looked it up but failed to solve the problem.
Can anyone help me with this?

The environment:

[root@VM-0-8-centos naf-mediasoup-adapter]# node -v
v17.1.0
[root@VM-0-8-centos naf-mediasoup-adapter]# npm -v
8.1.3
[root@VM-0-8-centos naf-mediasoup-adapter]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-8/root/usr --mandir=/opt/rh/devtoolset-8/root/usr/share/man --infodir=/opt/rh/devtoolset-8/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-8.3.1-20190311/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC) 
[root@VM-0-8-centos naf-mediasoup-adapter]# make -v
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[root@VM-0-8-centos naf-mediasoup-adapter]# python -V
Python 3.9.0a1

What I did:
npm install -g mediasoup@3

And the install log is:

[root@VM-0-8-centos naf-mediasoup-adapter]# npm install mediasoup@3 -g --verbose
npm verb cli [
npm verb cli   '/usr/local/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'install',
npm verb cli   'mediasoup@3',
npm verb cli   '-g',
npm verb cli   '--verbose'
npm verb cli ]
npm info using npm@8.1.3
npm info using node@v17.1.0
npm timing npm:load:whichnode Completed in 0ms
npm timing config:load:defaults Completed in 2ms
npm timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 11ms
npm timing config:load:builtin Completed in 11ms
npm timing config:load:cli Completed in 3ms
npm timing config:load:env Completed in 0ms
npm timing config:load:project Completed in 0ms
npm timing config:load:file:/root/.npmrc Completed in 6ms
npm timing config:load:user Completed in 6ms
npm timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:validate Completed in 1ms
npm timing config:load:credentials Completed in 2ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 26ms
npm timing npm:load:configload Completed in 26ms
npm timing npm:load:setTitle Completed in 0ms
npm timing npm:load:setupLog Completed in 0ms
npm timing config:load:flatten Completed in 3ms
npm timing npm:load:cleanupLog Completed in 3ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load:projectScope Completed in 1ms
npm timing npm:load Completed in 40ms
npm timing arborist:ctor Completed in 1ms
npm timing idealTree:init Completed in 6ms
npm timing idealTree:userRequests Completed in 4ms
npm http fetch GET 200 https://registry.npmmirror.com/mediasoup 56ms (cache hit)
npm http fetch GET 200 https://registry.npmmirror.com/@types%2fnode 44ms (cache hit)
npm http fetch GET 200 https://registry.npmmirror.com/supports-color 77ms (cache hit)
npm http fetch GET 200 https://registry.npmmirror.com/uuid 77ms (cache hit)
npm http fetch GET 200 https://registry.npmmirror.com/debug 81ms (cache hit)
npm http fetch GET 200 https://registry.npmmirror.com/h264-profile-level-id 82ms (cache hit)
npm timing idealTree:#root Completed in 153ms
npm http fetch GET 200 https://registry.npmmirror.com/ms 43ms (cache hit)
npm timing idealTree:node_modules/mediasoup Completed in 53ms
npm timing idealTree:node_modules/mediasoup/node_modules/@types/node Completed in 0ms
npm timing idealTree:node_modules/mediasoup/node_modules/debug Completed in 3ms
npm timing idealTree:node_modules/mediasoup/node_modules/h264-profile-level-id Completed in 0ms
npm timing idealTree:node_modules/mediasoup/node_modules/ms Completed in 0ms
npm timing idealTree:node_modules/mediasoup/node_modules/supports-color Completed in 0ms
npm timing idealTree:node_modules/mediasoup/node_modules/uuid Completed in 0ms
npm timing idealTree:buildDeps Completed in 210ms
npm timing idealTree:fixDepFlags Completed in 0ms
npm timing idealTree Completed in 224ms
npm timing reify:loadTrees Completed in 227ms
npm timing reify:diffTrees Completed in 2ms
npm timing reify:retireShallow Completed in 1ms
npm timing reify:createSparse Completed in 3ms
npm timing reify:loadBundles Completed in 0ms
npm timing reifyNode:node_modules/mediasoup/node_modules/ms Completed in 261ms
npm timing reifyNode:node_modules/mediasoup/node_modules/supports-color Completed in 263ms
npm timing reifyNode:node_modules/mediasoup/node_modules/debug Completed in 265ms
npm timing reifyNode:node_modules/mediasoup/node_modules/h264-profile-level-id Completed in 265ms
npm timing reifyNode:node_modules/mediasoup/node_modules/uuid Completed in 310ms
npm http fetch POST 404 https://registry.npmmirror.com/-/npm/v1/security/advisories/bulk 326ms (cache skip)
npm http fetch POST 404 https://registry.npmmirror.com/-/npm/v1/security/audits/quick 62ms (cache skip)
npm verb audit error HttpErrorGeneral: 404 Not Found - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick
npm verb audit error     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:95:15
npm verb audit error     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error     at async Map.[getReport] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:337:21)
npm verb audit error     at async Map.run (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:107:19)
npm verb audit error  HttpErrorGeneral: 404 Not Found - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick
npm verb audit error     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:95:15
npm verb audit error     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error     at async Map.[getReport] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:337:21)
npm verb audit error     at async Map.run (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:107:19) {
npm verb audit error   headers: [Object: null prototype] {
npm verb audit error     server: [ 'Tengine' ],
npm verb audit error     'content-type': [ 'text/html; charset=utf-8' ],
npm verb audit error     'content-length': [ '41' ],
npm verb audit error     connection: [ 'keep-alive' ],
npm verb audit error     'strict-transport-security': [ 'max-age=5184000' ],
npm verb audit error     date: [ 'Tue, 22 Nov 2022 03:31:12 GMT' ],
npm verb audit error     vary: [ 'Origin' ],
npm verb audit error     'x-frame-options': [ 'SAMEORIGIN' ],
npm verb audit error     'x-xss-protection': [ '1; mode=block' ],
npm verb audit error     'x-content-type-options': [ 'nosniff' ],
npm verb audit error     'x-download-options': [ 'noopen' ],
npm verb audit error     'x-readtime': [ '1.738' ],
npm verb audit error     'content-encoding': [ 'gzip' ],
npm verb audit error     'ali-swift-global-savetime': [ '1669087872' ],
npm verb audit error     via: [
npm verb audit error       'cache28.l2cn1837[0,0,404-0,H], cache41.l2cn1837[1,0], kunlun9.cn1492[29,29,404-1280,M], kunlun9.cn1492[31,0]'
npm verb audit error     ],
npm verb audit error     age: [ '0' ],
npm verb audit error     'x-cache': [ 'MISS TCP_MISS dirn:-2:-2' ],
npm verb audit error     'x-swift-savetime': [ 'Tue, 22 Nov 2022 03:31:12 GMT' ],
npm verb audit error     'x-swift-cachetime': [ '1' ],
npm verb audit error     'x-swift-error': [ 'orig response 4XX error' ],
npm verb audit error     'timing-allow-origin': [ '*' ],
npm verb audit error     eagleid: [ '7754811d16690878729433982e' ],
npm verb audit error     'x-fetch-attempts': [ '1' ],
npm verb audit error     'x-local-cache-status': [ 'skip' ]
npm verb audit error   },
npm verb audit error   statusCode: 404,
npm verb audit error   code: 'E404',
npm verb audit error   method: 'POST',
npm verb audit error   uri: 'https://registry.npmmirror.com/-/npm/v1/security/audits/quick',
npm verb audit error   body: <Buffer 3c 68 31 3e 34 30 34 20 4e 6f 74 20 46 6f 75 6e 64 3c 2f 68 31 3e>,
npm verb audit error   pkgid: undefined
npm verb audit error }
npm timing auditReport:getReport Completed in 397ms
npm timing reify:audit Completed in 399ms
npm timing reifyNode:node_modules/mediasoup/node_modules/@types/node Completed in 504ms
npm timing reifyNode:node_modules/mediasoup Completed in 654ms
npm timing reify:unpack Completed in 654ms
npm timing reify:unretire Completed in 0ms
npm timing build:queue Completed in 2ms
npm timing build:link:node_modules/mediasoup/node_modules/uuid Completed in 2ms
npm timing build:link Completed in 3ms
npm info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts.js postinstall
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
⸨##################⸩ ⠋ reify:mediasoup: info run mediasoup@3.11.3 postinstall node_modules/mediasoup node npm-scripts
npm info run mediasoup@3.11.3 postinstall { code: 1, signal: null }
npm timing reify:rollback:createSparse Completed in 644ms
npm timing reify:rollback:retireShallow Completed in 0ms
npm timing command:install Completed in 141980ms
npm verb stack Error: command failed
npm verb stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
npm verb stack     at ChildProcess.emit (node:events:390:28)
npm verb stack     at maybeClose (node:internal/child_process:1062:16)
npm verb stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm verb pkgid mediasoup@3.11.3
npm verb cwd /root/naf-mediasoup-adapter
npm verb Linux 3.10.0-1160.45.1.el7.x86_64
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "mediasoup@3" "-g" "--verbose"
npm verb node v17.1.0
npm verb npm  v8.1.3
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/mediasoup
npm ERR! command failed
npm ERR! command sh -c node npm-scripts.js postinstall
npm ERR! npm-scripts.js [INFO] running task "postinstall"
npm ERR! npm-scripts.js [INFO] executing command: node npm-scripts.js worker:build
npm ERR! npm-scripts.js [INFO] running task "worker:build"
npm ERR! npm-scripts.js [INFO] executing command: make -C worker
npm ERR! make: 进入目录“/usr/local/lib/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=/usr/local/lib/node_modules/mediasoup/worker/out/pip pip setuptools || \
npm ERR! 	/usr/bin/python3 -m pip install --target=/usr/local/lib/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: https://mirrors.aliyun.com/pypi/simple
npm ERR! Collecting pip
npm ERR!   Downloading https://mirrors.aliyun.com/pypi/packages/09/bd/2410905c76ee14c62baf69e3f4aa780226c1bbfc9485731ad018e35b0cb5/pip-22.3.1-py3-none-any.whl (2.1MB)
npm ERR! Collecting setuptools
npm ERR!   Downloading https://mirrors.aliyun.com/pypi/packages/1f/97/c03668380f278f1f8b0486d820c142cf224bba1bd78416e1797b52e0e81c/setuptools-65.6.0-py3-none-any.whl (1.2MB)
npm ERR! Installing collected packages: pip, setuptools
npm ERR! Successfully installed pip-22.3.1 setuptools-65.6.0
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=/usr/local/lib/node_modules/mediasoup/worker/out/pip  meson==0.61.5 ninja==1.10.2.4
npm ERR! Looking in indexes: https://mirrors.aliyun.com/pypi/simple
npm ERR! Collecting meson==0.61.5
npm ERR!   Using cached https://mirrors.aliyun.com/pypi/packages/18/db/3feb3cfa102553b9329d0c887b3c10480381de69abf6e8629f6b32f450df/meson-0.61.5-py3-none-any.whl (862 kB)
npm ERR! Collecting ninja==1.10.2.4
npm ERR!   Using cached https://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-0.61.5 ninja-1.10.2.4
npm ERR! /usr/local/lib/node_modules/mediasoup/worker/out/pip/bin/meson setup \
npm ERR! 	--prefix /usr/local/lib/node_modules/mediasoup/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! 	/usr/local/lib/node_modules/mediasoup/worker/out/Release/build || \
npm ERR! 	/usr/local/lib/node_modules/mediasoup/worker/out/pip/bin/meson setup \
npm ERR! 		--prefix /usr/local/lib/node_modules/mediasoup/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! 		/usr/local/lib/node_modules/mediasoup/worker/out/Release/build
npm ERR! The Meson build system
npm ERR! Version: 0.61.5
npm ERR! Source dir: /usr/local/lib/node_modules/mediasoup/worker
npm ERR! Build dir: /usr/local/lib/node_modules/mediasoup/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 8.3.1 "cc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)")
npm ERR! C linker for the host machine: cc ld.bfd 2.30-55
npm ERR! C++ compiler for the host machine: c++ (gcc 8.3.1 "c++ (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)")
npm ERR! C++ linker for the host machine: c++ ld.bfd 2.30-55
npm ERR! Host machine cpu family: x86_64
npm ERR! Host machine cpu: x86_64
npm ERR! Downloading openssl source from https://www.openssl.org/source/openssl-3.0.2.tar.gz
npm ERR! Download size: 15038141
npm ERR! Downloading: ..........
npm ERR! Downloading openssl patch from https://wrapdb.mesonbuild.com/v2/openssl_3.0.2-1/get_patch
npm ERR! A fallback URL could be specified using patch_fallback_url key in the wrap file
npm ERR! 
npm ERR! meson.build:163:0: ERROR: WrapDB connection failed to https://wrapdb.mesonbuild.com/v2/openssl_3.0.2-1/get_patch with error <urlopen error EOF occurred in violation of protocol (_ssl.c:1108)>
npm ERR! 
npm ERR! A full log can be found at /usr/local/lib/node_modules/mediasoup/worker/out/Release/build/meson-logs/meson-log.txt
npm ERR! make: 离开目录“/usr/local/lib/node_modules/mediasoup/worker”
npm ERR! Usage:   
npm ERR!   /usr/bin/python3 -m pip install [options] <requirement specifier> [package-index-options] ...
npm ERR!   /usr/bin/python3 -m pip install [options] -r <requirements file> [package-index-options] ...
npm ERR!   /usr/bin/python3 -m pip install [options] [-e] <vcs project url> ...
npm ERR!   /usr/bin/python3 -m pip install [options] [-e] <local project path> ...
npm ERR!   /usr/bin/python3 -m pip install [options] <archive url/path> ...
npm ERR! 
npm ERR! no such option: --system
npm ERR! WARNING: You are using pip version 19.2.3, however version 22.3.1 is available.
npm ERR! You should consider upgrading via the 'pip install --upgrade pip' command.
npm ERR! WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
npm ERR! Directory does not contain a valid build tree:
npm ERR! /usr/local/lib/node_modules/mediasoup/worker/out/Release/build
npm ERR! make: *** [setup] 错误 1
npm verb exit 1
npm timing npm Completed in 142243ms
npm verb unfinished npm timer reify 1669087872342
npm verb unfinished npm timer reify:build 1669087873247
npm verb unfinished npm timer build 1669087873247
npm verb unfinished npm timer build:deps 1669087873247
npm verb unfinished npm timer build:run:postinstall 1669087873252
npm verb unfinished npm timer build:run:postinstall:node_modules/mediasoup 1669087873252
npm verb code 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-11-22T03_33_34_330Z-debug.log