消除下载Android源码时的“curl: (7)”等错误
来源:互联网 发布:卡五星麻将app源码 编辑:程序博客网 时间:2024/06/14 18:03
gaojs@ubuntu:~$ mkdir ~/bin
gaojs@ubuntu:~$ cd ~/bin
gaojs@ubuntu:~/bin$ curl http://android.git.kernel.org/repo>~/bin/repo
curl: (7) couldn't connect to host
gaojs@ubuntu:~/bin$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
curl: (7) Failed to connect to 2404:6800:4005:c00::5d: Network is unreachable
替换成如下的命令即可:
gaojs@ubuntu:~/bin$ curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo"> ~/bin/repo
详见:http://php.webtutor.pl/en/2011/09/05/kernel-org-hacked-how-to-get-android-repo/
然后即可使用如下的命令,下载Android源码了:
gaojs@ubuntu:~/bin$ chmod 777 repo
gaojs@ubuntu:~/bin$ sudo cp repo /bin/
gaojs@ubuntu:~/bin$ mkdir android
gaojs@ubuntu:~/bin$ cd android
gaojs@ubuntu:~/bin/android$ repo init -u https://android.googlesource.com/platform/manifest
gaojs@ubuntu:~/bin/android$ repo sync
会报以下的错误:
fatal: '../platform/abi/cpp.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
error: Cannot fetch platform/abi/cpp
在.repo目录下的manifest.xml里找到fetch属性,改成:
fetch= "git://Android.git.linaro.org/"
然后,再执行repo sync命令!还会报错:
error: The requested URL returned error: 406 while accessing https://android.googlesource.com/platform/manifest/info/refs
fatal: HTTP request failed
解决方法:
1. 浏览器登录https://android.googlesource.com/new-password,并用gmail帐号登录;
2. 点击网页上的“允许访问”,得到类似:
Login for Git:
Staying Authenticated - Linux and Mac OS X:
Staying Authenticated - Windows:
3. 把上面那段信息追加到~/.netrc文件结尾(请检查当前用户的权限, 如果不存在此文件则自己新建一个);
4. 下载地址的URI更改为https://android.googlesource.com/a/platform/manifest(中间加上了“/a”)。
5. repo init -u https://android.googlesource.com/a/platform/manifest
6. repo sync
真够曲折的!
- 消除下载Android源码时的“curl: (7)”等错误
- android源码下载出现的错误
- curl 下载repo脚本出错以及下载android 源码
- Android下载源码,编译等的官网说明网址
- 下载Android源码提示错误
- 编译curl 源码包出现"TESTFAIL: These test cases failed: 20 172 507 "等相关的错误
- android 源码下载问题1--学习curl命令
- Android 源码下载遇到 403错误 的解决办法
- Android sdk更新,源码下载等
- 解决下载Android源码时遇到的url连接错误问题
- 解决下载Android源码时遇到的url连接错误问题
- android源码下载,编译及编译时遇到的错误整理
- 下载android源码 运行repo sync时出现错误
- 下载android源码时出现http请求错误到解决办法
- android、ios、windows等平台回声消除的解决方案
- Android源码的下载
- Android源码的下载
- repo错误 下载android源码出错
- MVC 乱码
- 一位大学生的坎坷辛苦求学路
- 三种方法绑定三列数据
- linux 下 avr开发环境的搭建
- Myeclipse中导入Android项目时,提示的错误:unable to resolve target 'android-14'
- 消除下载Android源码时的“curl: (7)”等错误
- UBUNTU添加开机自动启动程序方法
- org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not
- hdu 1010 Tempter of the Bone(DFS奇偶性剪枝+多重剪枝)
- MindNode.app 思维导图 下载是Pro版哦
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- A+B Problem新解
- C++文件流_矩阵相乘
- shell脚本学习-为什么使用 shell 编程