获取android源码时repo的错误
今天用repo获取android源码:
../bin/repo init -u git://android.git.kernel.org/platform/manifest.git
出现问题:
问题一:
Traceback (most recent call last):
File "./repo", line 590, in <module>
main(sys.argv[1:])
File "./repo", line 557, in main
_Init(args)
File "./repo", line 176, in _Init
_CheckGitVersion()
File "./repo", line 205, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
errread, errwrite)
File "/usr/lib/python2.5/subprocess.py", line 1147, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
原因:没有装git,faint
解决:
sudo apt-get install git
sudo apt-get install git-core
问题二:
装好了git,再次运行:
Traceback (most recent call last):
File "/home/calvin/Android/Android2.0/source/.repo/repo/main.py", line 235, in <module>
_Main(sys.argv[1:])
File "/home/calvin/Android/Android2.0/source/.repo/repo/main.py", line 217, in _Main
repo._Run(argv)
File "/home/calvin/Android/Android2.0/source/.repo/repo/main.py", line 123, in _Run
cmd.Execute(copts, cargs)
File "/home/calvin/Android/Android2.0/source/.repo/repo/subcmds/init.py", line 223, in Execute
self._ConfigureUser()
File "/home/calvin/Android/Android2.0/source/.repo/repo/subcmds/init.py", line 165, in _ConfigureUser
name = self._Prompt('Your Name', mp.UserName)
File "/home/calvin/Android/Android2.0/source/.repo/repo/project.py", line 306, in UserName
self._LoadUserIdentity()
File "/home/calvin/Android/Android2.0/source/.repo/repo/project.py", line 319, in _LoadUserIdentity
u = self.bare_git.var('GIT_COMMITTER_IDENT')
File "/home/calvin/Android/Android2.0/source/.repo/repo/project.py", line 1324, in runner
p.stderr))
error.GitError: manifests var:
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: empty ident <calvin@lihao-desktop.(none)> not allowed
解决:
看来的告知自己的身份才行。
运行:
[calvin@lihao-desktop ~/Android/Android2.0/source 18:44:28]$ git config --global user.email "lihao921@gmail.com"
[calvin@lihao-desktop ~/Android/Android2.0/source 18:44:28]$ git config --global user.name "Cavin Lee"
再运行repo:
[calvin@lihao-desktop ~/Android/Android2.0/source 18:45:00]$ ../bin/repo init -u git://android.git.kernel.org/platform/manifest.git
Your Name [Cavin Lee]:
Your Email [lihao921@gmail.com]:
Your identity is: Cavin Lee <lihao921@gmail.com>
is this correct [y/n]? y
Testing colorized output (for 'repo diff', 'repo status'):
black red green yellow blue magenta cyan white
bold dim ul reverse
Enable color display in this user account (y/n)? y
repo initialized in /home/calvin/Android/Android2.0/source(出现这个提示说明成功了)
接下来同步代码:
[calvin@lihao-desktop ~/Android/Android2.0/source 18:54:50]$ ../bin/repo sync
问题三:
同步代码时不断出现诸如 “remote end hung up unexpectedly“错误:
Fetching projects: 1% (2/158)
Initializing project platform/bootable/bootloader/legacy ...
fatal: The remote end hung up unexpectedly
error: Cannot fetch platform/bootable/bootloader/legacy
看样子是server的问题。
解决:
参考:http://android.amberfog.com/?p=230
http://code.google.com/p/android/issues/detail?id=4488
sudo gedit .repo/repo/subcmds/sync.py
修改_Fetch函数为:
def _Fetch(self, projects):
fetched = set()
pm = Progress('Fetching projects', len(projects))
for project in projects:
pm.update()
while True:
if project.Sync_NetworkHalf():
fetched.add(project.gitdir)
break
else:
print >>sys.stderr, 'error: Cannot fetch %s' % project.name
pm.end()
return fetched
注意代码缩进问题,相应的代码段缩进要完全一样。
获取android源码时repo的错误的更多相关文章
- (转)获取android源码时repo的错误
获取android源码时repo的错误 今天用repo获取android源码:../bin/repo init -u git://android.git.kernel.org/platform/man ...
- 获取android源码中遇到的问题
最近项目相当紧张,回家之后还需要继续研究android源码. 从网上找了一些资料,下载过程中还是遇到了很多问题.这里罗列一下: 1. 下载Repo过程中提示证书问题: curl https://dl- ...
- Kernel.org 被黑,获取 Android 源码方法一则
8 月底 9 月初,作为 Linux 的老窝,Kernel.org 被黑客攻击了,其攻击原因众说纷纭.一直以来 Linux 对于我来说不是很感兴趣,所以从来不会关注类似事件,可是这次这个攻击,却影响到 ...
- MacOS10.9获取Android源码不完全笔记(2014)
第一步:安装Macports 这个我就不叙述了,网上有无数教程 第二步:创建一个磁盘镜像 1.打开磁盘工具,然后: 第三步:使用Macport安装编译环境 1.打开终端输入以下内容 sudo port ...
- 【转】Android 源码编译make的错误处理--不错
原文网址:http://blog.csdn.net/ithomer/article/details/6977386 Android源码下载:官方下载 或参考android源码下载方式 Android编 ...
- Android源码及repo下载——亲自测试下载源码成功!
经过一段时间煞费苦心的下载都未能成功后,如今终于把android源代码下载成功,很是兴奋! 废话不多说,直接说下步骤: 1.安装git和curl:sudo apt-get install git-co ...
- android 源码编译中的错误 解决
1.编译种错误提示: arm-none-linux-gnueabi-gcc: directory: No such file or directory arm-none-linux-gnueabi-g ...
- Android源码编译make的错误处理
android源码下载:官方下载 或参考android源码下载方式 Android编译版本: PLATFORM_VERSION=4.0.1(最新Android 4.0.1) OS 操作系统平台: Li ...
- jdk/java版本与Android源码编译中的错误
错误一:javap未指向有效的java版本 Traceback (most recent call last): File "../../base/android/jni_generator ...
随机推荐
- COJ 0024 N皇后问题
N皇后问题 难度级别:B: 运行时间限制:1000ms: 运行空间限制:51200KB: 代码长度限制:2000000B 试题描述 在N*N的方格棋盘放置N个皇,使得它们不相互攻击(即任意2个 ...
- POJ-2240
Arbitrage Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 19063 Accepted: 8069 Descri ...
- 给大家推荐一款代替Visio的在线作图工具ProcessOn
过去作图的时候一直都是在用visio,每一次换了电脑使用都要重新安装,这大家都知道,最头疼的就是激活问题,曾经因为激活问题我“找遍了”正个互联网,最后还没找到...从08年开始到现在,visio用了这 ...
- angular 数据加载动画 longding
由于公司服务器架构不行,每次加载数据都要很久,但是都是使用angular来渲染数据,不像jquery有beforsend什么的方法, 这是一个github上找的,很轻使用也很简单 1.安装 npm ...
- 第一个ServiceStack程序
1. https://github.com/ServiceStack/ServiceStack/wiki/Create-your-first-webservice 2. http://tech.pro ...
- jQuery简单的Ajax调用示例
jQuery确实方便,下面做个简单的Ajax调用: 建立一个简单的html文件: <!DOCTYPE HTML> <html> <head> <script ...
- pods 这两篇就够了
http://www.cnblogs.com/gongyuhonglou/p/5801681.html http://blog.csdn.net/iunion/article/details/1701 ...
- 解决IE9以下ie版本不能识别新元素的方法 添加一个js -- Shiv Solution
Thankfully, Sjoerd Visscher created the "HTML5 Enabling JavaScript", "the shiv": ...
- POJ 2513 Colored Sticks - from lanshui_Yang
题目大意:给定一捆木棒,每根木棒的每个端点涂有某种颜色.问:是否能将这些棒子首位项链,排成一条直线,且相邻两根棍子的连接处的颜色一样. 解题思路:此题是一道典型的判断欧拉回路或欧拉通路的问题,以木棍的 ...
- poj 2454 Jersey Politics dfs
这个题目第一步还是比较明显的,先把最小的n个值去掉,剩下的问题就是能不能把数据分成两半,使得每一半和都大于n*500,这个刚开始考虑了下dp的做法,但是复杂度不满足要求. 那么能想到的就是搜索了,实际 ...