当前位置:   article > 正文

下载Android系统的源文件_fatal :'git' is not available

fatal :'git' is not available

Downloading the Source

http://source.android.com/source/downloading.html#getting-the-files

http://danny-chiu.iteye.com/blog/378770

 在Windows系统下下周Android系统的源代码

1、首先在Windows上安装Linux环境:Cygwin

Cygwin的主页:http://www.cygwin.com/install.html

下载32位windows上的安装程序:setup-x86.exe

注意:这个安装程序只是个安装管理程序,真正的系统包需要从网上下载,大致有几百M,在国内下需要很长时间。

好在国内有4个镜像网站:

  • China: mirrors.neusoft.edu.cn(ftp), mirrors.163.com(http), mirrors.neusoft.edu.cn(http), mirrors.ustc.edu.cn(http)

    可是依然很慢,所以在安装时先安装最基本的包

    gcc,make在Dlevel中

    2、在Cygwin中配置repo

    2.1 安装repo前需要先安装curl

    使用cygwin安装程序,手动安装

    参考:http://stackoverflow.com/questions/3647569/how-do-i-install-curl-on-cygwin

    2.2 安装apt-cyg:

    cd c:\cygwinsetup.exe -q -P wget,tar,qawk, bzip2,subversion,vim

    2.3 安装git

    没有安装git前:

    1. samsung@samsung-PC ~/bin/WORKING_DIRECTORY
    2. $ repo-1.19 init -u https://android.googlesource.com/platform/manifest
    3. fatal: 'git' is not available
    4. fatal: [Errno 2] No such file or directory
    5. Please make sure git is installed and in your path.
    6. samsung@samsung-PC ~/bin/WORKING_DIRECTORY

    安装后新的错误:

    1. samsung@samsung-PC ~/bin/WORKING_DIRECTORY
    2. $ repo-1.19 init -u https://android.googlesource.com/platform/manifest
    3. warning: gpg (GnuPG) is not available.
    4. warning: Installing it is strongly encouraged.
    5. fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
    6. fatal: error [Errno 114] Network is unreachable
    7. samsung@samsung-PC ~/bin/WORKING_DIRECTORY


     

     

    2.4 安装repo

    直接在主页下载:http://code.google.com/p/git-repo/downloads/detail?name=repo-1.19&can=2&q=

    没有安装git前

    1. samsung@samsung-PC ~/bin/WORKING_DIRECTORY
    2. $ repo-1.19 init -u https://android.googlesource.com/platform/manifest
    3. fatal: 'git' is not available
    4. fatal: [Errno 2] No such file or directory
    5. Please make sure git is installed and in your path.
    6. samsung@samsung-PC ~/bin/WORKING_DIRECTORY

    安装Git后:


    2.5 下载出错:

    1. samsung@samsung-PC ~/bin/WORKING_DIRECTORY
    2. $ repo-1.19 init -u https://android.googlesource.com/platform/manifest
    3. warning: gpg (GnuPG) is not available.
    4. warning: Installing it is strongly encouraged.
    5. fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
    6. fatal: error [Errno 114] Network is unreachable

    网络出错的解决方法:

    http://source.android.com/source/downloading.html#getting-the-files
    http://code.google.com/p/android/issues/detail?id=21736

    2.6 修改下载地址:

    1. samsung@samsung-PC ~/bin/WORKING_DIRECTORY
    2. $ repo-1.19 init -u http://android.googlesource.com/platform/manifest
    3. warning: gpg (GnuPG) is not available.
    4. warning: Installing it is strongly encouraged.
    5. Get https://gerrit.googlesource.com/git-repo
    6. remote: Counting objects: 101, done
    7. remote: Finding sources: 100% (101/101)
    8. remote: Total 2533 (delta 1442), reused 2533 (delta 1442)
    9. Receiving objects: 100% (2533/2533), 1.71 MiB | 651 KiB/s, done.
    10. Resolving deltas: 100% (1442/1442), done.
    11. From https://gerrit.googlesource.com/git-repo
    12. * [new branch] maint -> origin/maint
    13. * [new branch] master -> origin/master
    14. * [new branch] stable -> origin/stable
    15. * [new tag] v1.0 -> v1.0
    16. * [new tag] v1.0.1 -> v1.0.1
    17. * [new tag] v1.0.2 -> v1.0.2
    18. * [new tag] v1.0.3 -> v1.0.3
    19. * [new tag] v1.0.4 -> v1.0.4
    20. * [new tag] v1.0.5 -> v1.0.5
    21. * [new tag] v1.0.6 -> v1.0.6
    22. * [new tag] v1.0.7 -> v1.0.7
    23. * [new tag] v1.0.8 -> v1.0.8
    24. * [new tag] v1.0.9 -> v1.0.9
    25. * [new tag] v1.1 -> v1.1
    26. * [new tag] v1.10.0 -> v1.10.0
    27. * [new tag] v1.10.1 -> v1.10.1
    28. * [new tag] v1.10.2 -> v1.10.2
    29. * [new tag] v1.10.3 -> v1.10.3
    30. * [new tag] v1.10.4 -> v1.10.4
    31. * [new tag] v1.11.0 -> v1.11.0
    32. * [new tag] v1.11.1 -> v1.11.1
    33. * [new tag] v1.12.0 -> v1.12.0
    34. * [new tag] v1.12.1 -> v1.12.1
    35. * [new tag] v1.12.2 -> v1.12.2
    36. * [new tag] v1.2 -> v1.2
    37. * [new tag] v1.3 -> v1.3
    38. * [new tag] v1.3.1 -> v1.3.1
    39. * [new tag] v1.3.2 -> v1.3.2
    40. * [new tag] v1.4 -> v1.4
    41. * [new tag] v1.4.1 -> v1.4.1
    42. * [new tag] v1.4.2 -> v1.4.2
    43. * [new tag] v1.4.3 -> v1.4.3
    44. * [new tag] v1.4.4 -> v1.4.4
    45. * [new tag] v1.5 -> v1.5
    46. * [new tag] v1.5.1 -> v1.5.1
    47. * [new tag] v1.6 -> v1.6
    48. * [new tag] v1.6.1 -> v1.6.1
    49. * [new tag] v1.6.10 -> v1.6.10
    50. * [new tag] v1.6.10.1 -> v1.6.10.1
    51. * [new tag] v1.6.10.2 -> v1.6.10.2
    52. * [new tag] v1.6.2 -> v1.6.2
    53. * [new tag] v1.6.3 -> v1.6.3
    54. * [new tag] v1.6.4 -> v1.6.4
    55. * [new tag] v1.6.5 -> v1.6.5
    56. * [new tag] v1.6.6 -> v1.6.6
    57. * [new tag] v1.6.7 -> v1.6.7
    58. * [new tag] v1.6.7.1 -> v1.6.7.1
    59. * [new tag] v1.6.7.2 -> v1.6.7.2
    60. * [new tag] v1.6.7.3 -> v1.6.7.3
    61. * [new tag] v1.6.7.4 -> v1.6.7.4
    62. * [new tag] v1.6.7.5 -> v1.6.7.5
    63. * [new tag] v1.6.8 -> v1.6.8
    64. * [new tag] v1.6.8.1 -> v1.6.8.1
    65. * [new tag] v1.6.8.10 -> v1.6.8.10
    66. * [new tag] v1.6.8.11 -> v1.6.8.11
    67. * [new tag] v1.6.8.2 -> v1.6.8.2
    68. * [new tag] v1.6.8.3 -> v1.6.8.3
    69. * [new tag] v1.6.8.4 -> v1.6.8.4
    70. * [new tag] v1.6.8.5 -> v1.6.8.5
    71. * [new tag] v1.6.8.6 -> v1.6.8.6
    72. * [new tag] v1.6.8.7 -> v1.6.8.7
    73. * [new tag] v1.6.8.8 -> v1.6.8.8
    74. * [new tag] v1.6.8.9 -> v1.6.8.9
    75. * [new tag] v1.6.9 -> v1.6.9
    76. * [new tag] v1.6.9.1 -> v1.6.9.1
    77. * [new tag] v1.6.9.2 -> v1.6.9.2
    78. * [new tag] v1.6.9.3 -> v1.6.9.3
    79. * [new tag] v1.6.9.4 -> v1.6.9.4
    80. * [new tag] v1.6.9.5 -> v1.6.9.5
    81. * [new tag] v1.6.9.6 -> v1.6.9.6
    82. * [new tag] v1.6.9.7 -> v1.6.9.7
    83. * [new tag] v1.6.9.8 -> v1.6.9.8
    84. * [new tag] v1.7 -> v1.7
    85. * [new tag] v1.7.1 -> v1.7.1
    86. * [new tag] v1.7.2 -> v1.7.2
    87. * [new tag] v1.7.3 -> v1.7.3
    88. * [new tag] v1.7.3.1 -> v1.7.3.1
    89. * [new tag] v1.7.4 -> v1.7.4
    90. * [new tag] v1.7.4.1 -> v1.7.4.1
    91. * [new tag] v1.7.4.2 -> v1.7.4.2
    92. * [new tag] v1.7.4.3 -> v1.7.4.3
    93. * [new tag] v1.7.5 -> v1.7.5
    94. * [new tag] v1.7.6 -> v1.7.6
    95. * [new tag] v1.7.6.1 -> v1.7.6.1
    96. * [new tag] v1.7.7 -> v1.7.7
    97. * [new tag] v1.7.7.1 -> v1.7.7.1
    98. * [new tag] v1.7.7.2 -> v1.7.7.2
    99. * [new tag] v1.7.7.3 -> v1.7.7.3
    100. * [new tag] v1.7.7.4 -> v1.7.7.4
    101. * [new tag] v1.7.7.5 -> v1.7.7.5
    102. * [new tag] v1.7.7.6 -> v1.7.7.6
    103. * [new tag] v1.7.8 -> v1.7.8
    104. * [new tag] v1.7.8.1 -> v1.7.8.1
    105. * [new tag] v1.7.8.2 -> v1.7.8.2
    106. * [new tag] v1.8.0 -> v1.8.0
    107. * [new tag] v1.8.1 -> v1.8.1
    108. * [new tag] v1.8.2 -> v1.8.2
    109. * [new tag] v1.9.0 -> v1.9.0
    110. * [new tag] v1.9.1 -> v1.9.1
    111. * [new tag] v1.9.2 -> v1.9.2
    112. * [new tag] v1.9.3 -> v1.9.3
    113. * [new tag] v1.9.4 -> v1.9.4
    114. * [new tag] v1.9.5 -> v1.9.5
    115. * [new tag] v1.9.6 -> v1.9.6
    116. 0 [main] python2.7 15928 child_info_fork::abort: address space needed by 'datetime.dll' (0x3D0000) is already occupied
    117. Traceback (most recent call last):
    118. File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/main.py", line 414, in <module>
    119. _Main(sys.argv[1:])
    120. File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/main.py", line 390, in _Main
    121. result = repo._Run(argv) or 0
    122. File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/main.py", line 138, in _Run
    123. result = cmd.Execute(copts, cargs)
    124. File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/subcmds/init.py", line 342, in Execute
    125. git_require(MIN_GIT_VERSION, fail=True)
    126. File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/git_command.py", line 110, in git_require
    127. git_version = git.version_tuple()
    128. File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/git_command.py", line 89, in version_tuple
    129. ver_str = git.version()
    130. File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/git_command.py", line 80, in version
    131. p = GitCommand(None, ['--version'], capture_stdout=True)
    132. File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/git_command.py", line 222, in __init__
    133. raise GitError('%s: %s' % (command[1], e))
    134. error.GitError: --version: [Errno 11] Resource temporarily unavailable


     2.7 重启cygwin后

    1. samsung@samsung-PC ~/bin/WORKING_DIRECTORY
    2. $ repo-1.19 init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
    3. /usr/bin/env: python: No such file or directory


     

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/129221
推荐阅读
相关标签
  

闽ICP备14008679号