error: Exited sync due to gc errors 解決方法
執行repo sync 的時候,錯誤資訊:error: Exited sync due to gc errors
原因: repo 升級,不相容GIT 1.7.2 以下的版本。
方案升級git到 1.7.2以及以上的版本。
Ubuntu10.x使用者可嘗試如下操作:
1、修改/etc/apt/sources.list檔案
把下面內容加到最後面
deb-src http://mirrors.163.com/ubuntu/ oneiric main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ oneiric-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ oneiric-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ oneiric-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ oneiric-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ oneiric-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ oneiric-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ oneiric-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ oneiric-updates universe main multiverse restricted
2、執行下面兩個命令
sudo apt-get update
sudo apt-get install git
3、在執行指令sudo apt-get update時,可能會出現錯誤:動態 MMap 沒有空間了。請增大 APT::Cache-Limit 的大小。
解決方法:
系統裡一般沒有apt.conf
檔案,,,這個要新建,,,,,,
編輯 sudo gedit /etc/apt/apt.conf(如果沒有apt.conf這個檔案就新建一個)
在裡面增加或者修改以下引數,把後面的數字儘量的調大即可,如果調大後重復出現該問題,繼續增加數字即可
APT::Cache-Limit 99999999;