android的报错源码,解决获取android源码时repo的错误

在尝试使用repo获取Android源码时遇到了问题,报错'Nosuchfileordirectory'。经过排查发现是因为缺少Git导致的。安装Git后,通过`apt-getinstallgit`和`apt-getinstallgit-core`解决了问题。成功安装后,repo开始从git服务器下载并初始化相关工具和manifest。
摘要由CSDN通过智能技术生成

今天用repo获取android源码

发现只有我常用的虚拟机可以,服务器和宿舍的虚拟机运行repo都报错

错误如下:

Traceback (most recent call last):

File "./repo", line 590, in 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

翻了一晚上的android mail list,安装了无数个lib库,终于找到真正原因——竟然是没有装GIT,晕

apt-get install git

apt-get install git-core

就OK了!

% Total    % Received % Xferd Average Speed   Time    Time     Time Current

Dload Upload   Total   Spent    Left Speed

100 16996    0 16996    0     0   3458      0 --:--:-- 0:00:04 --:--:-- 8035

gpg: 钥匙环‘/root/.repoconfig/gnupg/secring.gpg’已建立

gpg: 钥匙环‘/root/.repoconfig/gnupg/pubring.gpg’已建立

gpg: /root/.repoconfig/gnupg/trustdb.gpg:建立了信任度数据库

gpg: 密钥 920F5C65:公钥“Repo Maintainer <>”已导入

gpg: 合计被处理的数量:1

gpg:               已导入:1

Getting repo ...

from git://android.git.kernel.org/tools/repo.git

warning: no common commits

remote: Counting objects: 749, done.

remote: Compressing objects: 100% (311/311), done.

remote: Total 749 (delta 487), reused 645 (delta 419)

Receiving objects: 100% (749/749), 239.80 KiB | 8 KiB/s, done.

Resolving deltas: 100% (487/487), done.

From git://android.git.kernel.org/tools/repo

* [new branch]      master     -> origin/master

* [new branch]      stable     -> origin/stable

remote: Counting objects: 41, done.

remote: Compressing objects: 100% (41/41), done.

remote: Total 41 (delta 0), reused 37 (delta 0)

Unpacking objects: 100% (41/41), done.

From git://android.git.kernel.org/tools/repo

* [new tag]         v1.0       -> v1.0

* [new tag]         v1.0.1     -> v1.0.1

* [new tag]         v1.0.2     -> v1.0.2

* [new tag]         v1.0.3     -> v1.0.3

* [new tag]         v1.0.4     -> v1.0.4

* [new tag]         v1.0.5     -> v1.0.5

* [new tag]         v1.0.6     -> v1.0.6

* [new tag]         v1.0.7     -> v1.0.7

* [new tag]         v1.0.8     -> v1.0.8

* [new tag]         v1.0.9     -> v1.0.9

* [new tag]         v1.1       -> v1.1

* [new tag]         v1.2       -> v1.2

* [new tag]         v1.3       -> v1.3

* [new tag]         v1.3.1     -> v1.3.1

* [new tag]         v1.3.2     -> v1.3.2

* [new tag]         v1.4       -> v1.4

* [new tag]         v1.4.1     -> v1.4.1

* [new tag]         v1.4.2     -> v1.4.2

* [new tag]         v1.4.3     -> v1.4.3

* [new tag]         v1.4.4     -> v1.4.4

* [new tag]         v1.5       -> v1.5

* [new tag]         v1.5.1     -> v1.5.1

* [new tag]         v1.6       -> v1.6

* [new tag]         v1.6.1     -> v1.6.1

* [new tag]         v1.6.2     -> v1.6.2

* [new tag]         v1.6.3     -> v1.6.3

* [new tag]         v1.6.4     -> v1.6.4

* [new tag]         v1.6.5     -> v1.6.5

* [new tag]         v1.6.6     -> v1.6.6

* [new tag]         v1.6.7     -> v1.6.7

* [new tag]         v1.6.7.1   -> v1.6.7.1

* [new tag]         v1.6.7.2   -> v1.6.7.2

* [new tag]         v1.6.7.3   -> v1.6.7.3

* [new tag]         v1.6.7.4   -> v1.6.7.4

* [new tag]         v1.6.7.5   -> v1.6.7.5

* [new tag]         v1.6.8     -> v1.6.8

* [new tag]         v1.6.8.1   -> v1.6.8.1

* [new tag]         v1.6.8.2   -> v1.6.8.2

* [new tag]         v1.6.8.3   -> v1.6.8.3

* [new tag]         v1.6.8.4   -> v1.6.8.4

* [new tag]         v1.6.8.5   -> v1.6.8.5

Getting manifest ...

from git://android.git.kernel.org/platform/manifest.git

warning: no common commits

remote: Counting objects: 102, done.

remote: Compressing objects: 100% (33/33), done.

remote: Total 102 (delta 36), reused 102 (delta 36)

Receiving objects: 100% (102/102), 26.54 KiB | 22 KiB/s, done.

Resolving deltas: 100% (36/36), done.

From git://android.git.kernel.org/platform/manifest

* [new branch]      android-1.5 -> origin/android-1.5

* [new branch]      android-1.5r2 -> origin/android-1.5r2

* [new branch]      android-sdk-1.5-pre -> origin/android-sdk-1.5-pre

* [new branch]      android-sdk-1.5_r1 -> origin/android-sdk-1.5_r1

* [new branch]      cdma-import -> origin/cdma-import

* [new branch]      cupcake    -> origin/cupcake

* [new branch]      donut      -> origin/donut

* [new branch]      master     -> origin/master

* [new branch]      release-1.0 -> origin/release-1.0

remote: Counting objects: 5, done.

remote: Compressing objects: 100% (5/5), done.

remote: Total 5 (delta 0), reused 5 (delta 0)

Unpacking objects: 100% (5/5), done.

From git://android.git.kernel.org/platform/manifest

* [new tag]         android-1.0 -> android-1.0

* [new tag]         android-1.5 -> android-1.5

* [new tag]         android-1.5r2 -> android-1.5r2

* [new tag]         android-sdk-1.5-pre -> android-sdk-1.5-pre

* [new tag]         android-sdk-1.5_r1 -> android-sdk-1.5_r1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值