亚欧色一区w666天堂,色情一区二区三区免费看,少妇特黄A片一区二区三区,亚洲人成网站999久久久综合,国产av熟女一区二区三区

  • 發布文章
  • 消息中心
點贊
收藏
評論
分享
原創

Centos8源碼編譯Mongodb

2024-10-17 09:34:35
9
0

從git下載源碼(ma)

git clone ,這里下載4.0版本的(de)

安裝相關(guan)依賴

yum install -y libcurl-devel
yum install libcurl openssl
python3 -m pip install poetry
yum install openssl openssl-devel

執行(xing)編譯

解(jie)壓然(ran)后(hou)進入到源碼目錄,執行(xing):

python3 buildscripts/scons.py --link-model=static --opt=on all
[root mongo]# python3 buildscripts/scons.py --link-model=static --opt=on all
Checking required python packages...
Traceback (most recent call last):
File "buildscripts/scons.py", line 25, in
verify_requirements()
File "/data/mongo/mongo/site_scons/mongo/pip_requirements.py", line 48, in verify_requirements
capture_output=True, text=True)
File "/usr/lib64/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
TypeError:
init() got an unexpected keyword argument 'capture_output'

問題解決

python3版本是3.6的,升級為3.7:

wget //mirrors.huaweicloud.com/python/3.7.2/Python-3.7.2.tgz
tar -zxvf Python-3.7.2.tgz
cd Python-3.7.2
./configure prefix=/usr/local/python3 
yum install libffi-devel
make && make install

/usr/local/python3/bin/python3 -m pip install --upgrade pip
/usr/local/python3/bin/python3 -m pip install 'poetry==1.5.1'

/usr/local/python3/bin/python3 buildscripts/scons.py --link-model=static --opt=on all

[root@localhost mongo]# /usr/local/python3/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
Checking required python packages...
Traceback (most recent call last):
  File "buildscripts/scons.py", line 25, in <module>
    verify_requirements()
  File "/data/mongo/mongo/site_scons/mongo/pip_requirements.py", line 48, in verify_requirements
    capture_output=True, text=True)
  File "/usr/local/python3/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/local/python3/bin/python3', '-m', 'poetry', 'install', '--no-root', '--sync', '--dry-run']' returned non-zero exit status 1.

手(shou)動執(zhi)行下面命(ming)令:

[root@localhost mongo]# /usr/local/python3/bin/python3 -m poetry install --no-root --sync --dry-run
The currently activated Python version 3.7.2 is not supported by the project (>=3.9,<4.0).
Trying to find and use a compatible version. 

Poetry was unable to find a compatible version. If you have one, you can explicitly use it via the "env use" command.

問了chatgpt,要升級python版本大于等于3.9

升完級后,繼續編譯:
/usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
提示安裝:
/usr/local/python3.9/bin/python3 -m pip install 'poetry==1.5.1'
/usr/local/python3.9/bin/python3 -m pip install --upgrade pip

繼續編譯:
/usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
提示下面錯誤:

Detected one or more packages are out of date. Try running:
    export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
    /usr/local/python3.9/bin/python3 -m poetry install --no-root --sync

按要求(qiu)執行(xing)下面命(ming)令(ling):

export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
/usr/local/python3.9/bin/python3 -m poetry install --no-root --sync

提(ti)示下面錯誤(wu):

ModuleNotFoundError: No module named 'mongo_tooling_metrics':
  File "/data/mongo/mongo/SConstruct", line 28:
    from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics

問ChatGPT,執行下面命令:
/usr/local/python3.9/bin/python3 -m pip install mongo_tooling_metrics

繼續編譯:
/usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
提示下面錯誤:

scons: Reading SConscript files ...
ModuleNotFoundError: No module named 'psutil':
  File "/data/mongo/mongo/SConstruct", line 61:
    import psutil

執行下面命令:
/usr/local/python3.9/bin/python3 -m pip install psutil

提示下(xia)面(mian)錯(cuo)誤:

scons: Reading SConscript files ...
scons: running with args /usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
WARNING: The build_metrics tool might not work as intended due to a failed import:
No module named 'memory_profiler'
Invalid MONGO_VERSION '', or could not derive from version.json or git metadata. Please add a conforming MONGO_VERSION=x.y.z[-extra] as an argument to SCons

/usr/local/python3.9/bin/python3 -m pip install memory-profiler

提示(shi)下面錯誤:

WARNING: The build_metrics tool might not work as intended due to a failed import:
No module named 'puremagic'
Invalid MONGO_VERSION '', or could not derive from version.json or git metadata. Please add a conforming MONGO_VERSION=x.y.z[-extra] as an argument to SCons

/usr/local/python3.9/bin/python3 -m pip install puremagic
/usr/local/python3.9/bin/python3 -m pip install networkx

/usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all MONGO_VERSION=7.1.2

/usr/local/python3.9/bin/python3 -m pip install bz2file
/usr/local/python3.9/bin/python3 -m pip install PyYAML
yum install bzip2-devel

scons: running with args /usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all MONGO_VERSION=7.1.2
WARNING: The build_metrics tool might not work as intended due to a failed import:
No module named '_bz2'
scons version: 3.1.2
python version: 3 9 16 'final' 0
Mkdir("build/tmp_test_data")
CC is gcc
gcc found in $PATH at /usr/bin/gcc
CXX is g++
g++ was not found in $PATH
g++ resolves to /data/mongo/mongo/g++
Checking if C++ compiler "g++" is GCC... no
Checking if C++ compiler "g++" is clang... no
Couldn't identify the C++ compiler
See /data/mongo/mongo/build/scons/config.log for details

接(jie)著安裝(zhuang)gcc12

下載gcc 12的包

ln -s /usr/local/gcc-12.2.0/bin/gcc gcc

ln -s /usr/local/gcc-12.2.0/bin/g++ g++

0條評論
0 / 1000
9****m
15文章數(shu)
1粉絲數
9****m
15 文(wen)章(zhang) | 1 粉絲
9****m
15文章數
1粉絲(si)數(shu)
9****m
15 文章 | 1 粉絲
原(yuan)創

Centos8源碼編譯Mongodb

2024-10-17 09:34:35
9
0

從git下載源碼

git clone ,這(zhe)里下載4.0版本的(de)

安(an)裝相(xiang)關依賴(lai)

yum install -y libcurl-devel
yum install libcurl openssl
python3 -m pip install poetry
yum install openssl openssl-devel

執(zhi)行(xing)編譯

解壓然后(hou)進入到(dao)源碼目錄,執行:

python3 buildscripts/scons.py --link-model=static --opt=on all
[root mongo]# python3 buildscripts/scons.py --link-model=static --opt=on all
Checking required python packages...
Traceback (most recent call last):
File "buildscripts/scons.py", line 25, in
verify_requirements()
File "/data/mongo/mongo/site_scons/mongo/pip_requirements.py", line 48, in verify_requirements
capture_output=True, text=True)
File "/usr/lib64/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
TypeError:
init() got an unexpected keyword argument 'capture_output'

問題解決

python3版本是3.6的,升(sheng)級為3.7:

wget //mirrors.huaweicloud.com/python/3.7.2/Python-3.7.2.tgz
tar -zxvf Python-3.7.2.tgz
cd Python-3.7.2
./configure prefix=/usr/local/python3 
yum install libffi-devel
make && make install

/usr/local/python3/bin/python3 -m pip install --upgrade pip
/usr/local/python3/bin/python3 -m pip install 'poetry==1.5.1'

/usr/local/python3/bin/python3 buildscripts/scons.py --link-model=static --opt=on all

[root@localhost mongo]# /usr/local/python3/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
Checking required python packages...
Traceback (most recent call last):
  File "buildscripts/scons.py", line 25, in <module>
    verify_requirements()
  File "/data/mongo/mongo/site_scons/mongo/pip_requirements.py", line 48, in verify_requirements
    capture_output=True, text=True)
  File "/usr/local/python3/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/local/python3/bin/python3', '-m', 'poetry', 'install', '--no-root', '--sync', '--dry-run']' returned non-zero exit status 1.

手動執行(xing)下面命令(ling):

[root@localhost mongo]# /usr/local/python3/bin/python3 -m poetry install --no-root --sync --dry-run
The currently activated Python version 3.7.2 is not supported by the project (>=3.9,<4.0).
Trying to find and use a compatible version. 

Poetry was unable to find a compatible version. If you have one, you can explicitly use it via the "env use" command.

問了chatgpt,要升級python版本大于等于3.9

升完級后,繼續編譯:
/usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
提示安裝:
/usr/local/python3.9/bin/python3 -m pip install 'poetry==1.5.1'
/usr/local/python3.9/bin/python3 -m pip install --upgrade pip

繼續編譯:
/usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
提示下面錯誤:

Detected one or more packages are out of date. Try running:
    export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
    /usr/local/python3.9/bin/python3 -m poetry install --no-root --sync

按要求執行下面命令:

export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
/usr/local/python3.9/bin/python3 -m poetry install --no-root --sync

提示下面錯(cuo)誤:

ModuleNotFoundError: No module named 'mongo_tooling_metrics':
  File "/data/mongo/mongo/SConstruct", line 28:
    from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics

問ChatGPT,執行下面命令:
/usr/local/python3.9/bin/python3 -m pip install mongo_tooling_metrics

繼續編譯:
/usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
提(ti)示下面錯(cuo)誤(wu):

scons: Reading SConscript files ...
ModuleNotFoundError: No module named 'psutil':
  File "/data/mongo/mongo/SConstruct", line 61:
    import psutil

執行下面命令:
/usr/local/python3.9/bin/python3 -m pip install psutil

提示下面錯誤:

scons: Reading SConscript files ...
scons: running with args /usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all
WARNING: The build_metrics tool might not work as intended due to a failed import:
No module named 'memory_profiler'
Invalid MONGO_VERSION '', or could not derive from version.json or git metadata. Please add a conforming MONGO_VERSION=x.y.z[-extra] as an argument to SCons

/usr/local/python3.9/bin/python3 -m pip install memory-profiler

提示下面錯(cuo)誤:

WARNING: The build_metrics tool might not work as intended due to a failed import:
No module named 'puremagic'
Invalid MONGO_VERSION '', or could not derive from version.json or git metadata. Please add a conforming MONGO_VERSION=x.y.z[-extra] as an argument to SCons

/usr/local/python3.9/bin/python3 -m pip install puremagic
/usr/local/python3.9/bin/python3 -m pip install networkx

/usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all MONGO_VERSION=7.1.2

/usr/local/python3.9/bin/python3 -m pip install bz2file
/usr/local/python3.9/bin/python3 -m pip install PyYAML
yum install bzip2-devel

scons: running with args /usr/local/python3.9/bin/python3 buildscripts/scons.py --link-model=static --opt=on all MONGO_VERSION=7.1.2
WARNING: The build_metrics tool might not work as intended due to a failed import:
No module named '_bz2'
scons version: 3.1.2
python version: 3 9 16 'final' 0
Mkdir("build/tmp_test_data")
CC is gcc
gcc found in $PATH at /usr/bin/gcc
CXX is g++
g++ was not found in $PATH
g++ resolves to /data/mongo/mongo/g++
Checking if C++ compiler "g++" is GCC... no
Checking if C++ compiler "g++" is clang... no
Couldn't identify the C++ compiler
See /data/mongo/mongo/build/scons/config.log for details

接著安裝gcc12

下(xia)載gcc 12的包

ln -s /usr/local/gcc-12.2.0/bin/gcc gcc

ln -s /usr/local/gcc-12.2.0/bin/g++ g++

文章來自個人專欄
文章 | 訂閱(yue)
0條評論
0 / 1000
請輸入你的評論
0
0