zoukankan      html  css  js  c++  java
  • 获取android源码中遇到的问题

    最近项目相当紧张,回家之后还需要继续研究android源码。

    从网上找了一些资料,下载过程中还是遇到了很多问题。这里罗列一下:

    1. 下载Repo过程中提示证书问题:

    curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

    curl: (60) SSL certificate problem: unable to get local issuer certificate

    More details here: http://curl.haxx.se/docs/sslcerts.html
     
    curl performs SSL certificate verification by default, using a "bundle"
     of Certificate Authority (CA) public keys (CA certs). If the default
     bundle file isn't adequate, you can specify an alternate file
     using the --cacert option.
    If this HTTPS server uses a certificate signed by a CA represented in
     the bundle, the certificate verification probably failed due to a
     problem with the certificate (it might be expired, or the name might
     not match the domain name in the URL).
    If you'd like to turn off curl's verification of the certificate, use
     the -k (or --insecure) option../bin/repo: 行 1: 未预期的符号 `newline' 附近有语法错误
    ./bin/repo: 行 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    '
     
    从baidu搜索到:
    在验证证书的时候出现问题,是本地ssl判别证书太旧,导致报ssl证书错误
    下载新的ssl本地判别文件
         wget http://curl.haxx.se/ca/cacert.pem
     并更名为ca-bundle.crt放置到默认目录
          mv cacert.pem ca-bundle.crt  | mv ca-bundle.crt /etc/pki/tls/certs/
     或者curl  –cacert cacert.pem 方式指定调用
     
    这里参考了一个网友的做法:
    将https换成http链接进行下载,OK
     
    2.  ./bin/repo: 行 1: 未预期的符号 `newline' 附近有语法错误
      ./bin/repo: 行 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    '
     
    由于
    服务器无法访问导致android的源码无法下载,这是另外一个git服务器的android源码的repo文件。

    操作如下

    $ curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ./repo //获取repo

    $ chmod a+x repo

     3. repo sync,出现“fatal: '../platform/abi/cpp.git' does not appear to be a git repository”
     
    解决办法 :
      打开.repo目录下的manifest.xml文件(命令vim manifest.xml),并找到fetch属性,在我的文件中显示fetch="..",将fetch修改为fetch="git://android.git.linaro.org/",OK
     
  • 相关阅读:
    August 4th, 2016, Week 32nd, Thursday
    August 3rd, 2016, Week 32nd, Wednesday
    Java的垃圾回收机制
    学java入门到精通,不得不看的15本书
    java中set和get方法的理解
    eclipse快捷键
    main方法无法编译
    Java构造器和方法的区别
    交换两个变量的值,不使用第三个变量
    计算圆周率 Pi (π)值, 精确到小数点后 10000 位 只需要 30 多句代码
  • 原文地址:https://www.cnblogs.com/caidi/p/3475950.html
Copyright © 2011-2022 走看看