一、安裝depot_tools工具

首先你的電腦上安裝了git

1)    下載depot_tools

cd到下載的目錄下

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

 

使用git下載源碼的時候會報這樣的錯誤

unable to access 'https://chromium.googlesource.com/chromium/tools/depot_tools.git/': Failed to connect to chromium.googlesource.com port 443: Operation timed out

可以按照下面這篇博客的方式進行配置就能下載了

https://laod.cn/hosts/2017-google-hosts.html/comment-page-6

2)    把depot_tools的路徑添加到export PATH=`pwd`/depot_tools:"$PATH"

3)    檢測路徑是否添加正確

運行命令echo $PATH,查看工具的路徑是否正確,如果不正確的話

下載webrtc的源碼會報錯fetch: command not found

檢測depot_tools是否配置正確的方式還可以直接在終端輸入gn然后按tab鍵

如果配置正確將顯示

gn         gn.py      gnuattach  gnuclient  gnudoit    gnumake    gnuserv

如果配置不正確將顯示

gnuattach  gnuclient  gnudoit    gnumake    gnuserv

 

 

二、下載webrtc的源碼

首先你需要有VPN能FQ,推薦使用紅杏

fetch --nohooks webrtc_ios
gclient sync

延伸閱讀

學習是年輕人改變自己的最好方式-Java培訓,做最負責任的教育,學習改變命運,軟件學習,再就業(yè),大學生如何就業(yè),幫大學生找到好工作,lphotoshop培訓,電腦培訓,電腦維修培訓,移動軟件開發(fā)培訓,網(wǎng)站設計培訓,網(wǎng)站建設培訓學習是年輕人改變自己的最好方式