問題1:Python版本問題
報錯信息:
NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer
ubuntu 18默認的python3是3.6.
解決方案1:從源碼安裝python 3.7
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
tar -xzvf Python-3.7.4.tgz
cd Python-3.7.4
./configure --prefix=/usr/local/src/python37? # 配置安裝位置
sudo make
sudo make install
?解決方案2:安裝python 3.7(推薦)
sudo apt install python3.7
sudo rm -rf? /usr/bin/python3
sudo ln -s? /usr/bin/python3.7?/usr/bin/python3
?pip3 install ninja 失敗找不到ninja
更新python源:
-
切換到根目錄下
$?cd?~
-
新建
.pip
目錄并進入$?mkdir?.pip $?cd?.pip
-
新建
pip.conf
文件并用vim打開$?touch?pip.conf $?vim?pip.conf
4. 將以下寫入
[global]index-url?=?https://artsz.zte.com.cn/artifactory/api/pypi/public-pypi-virtual/simple[install]trusted-host=artsz.zte.com.cn
5. 重新安裝
sudo apt-get install python3-pip
sudo pip3?install meson
sudo pip3?install ninja