不能編譯鴻蒙源代碼

(一)

從鴻蒙官方下載了Hi3516的源代碼,不能成功編譯.
輸入:
python build.py ipcamera_hi3516dv300 -b debug
提示無權限:
輸入:
sudo python build.py ipcamera_hi3516dv300 -b debug
提示找不到clang
而已經確定編譯工具鏈成功安裝,環境變量成功設置。
在這裏插入圖片描述
ll後發現out/目錄用戶名和其他目錄不一樣。
重新解壓源代碼,
輸入:
python build.py ipcamera_hi3516dv300 -b debug
編譯成功。

(二)
輸入:
sudo tar xzvf code-1.0.tar.gz
用戶名稱變爲root:
在這裏插入圖片描述
輸入:
python build.py ipcamera_hi3516dv300 -b debug
會提示無權限,編譯失敗。
在這裏插入圖片描述
由於前面執行編譯命令時,沒有加sudo,out/目錄用戶名爲chenqh
輸入:
sudo python build.py ipcamera_hi3516dv300 -b debug
提示找不到clang。
在這裏插入圖片描述
(三)
先後輸入:
sudo tar xzvf code-1.0.tar.gz
sudo python build.py ipcamera_hi3516dv300 -b debug
提示找不到clang,不能通過編譯。
在這裏插入圖片描述

總結: 解壓源代碼和編譯的時候,都不能使用sudo。