1. 在虚拟机运行的Centos5.6,下载git文件,对其进行解压:
tar xzvf git-latest.tar.gz
cd git-latest
./configure
make
make install
当运行./configure时,发现出现了错误(configure: error: no acceptable C compiler found in $PATH),
在网上查找时,是没有安装gcc组件,尝试着运行 yum install gcc,出来的提示信息是:Another app is
currently holding the yum lock; waiting for it to exit...,,运行rm -f /var/run/yum.pid,将其删除,然后再运行
gcc的安装命令,提示对应的Centos服务器连接地址不存在HTTP404错误。
2. 直接把对应的Centos服务器地址进行复制,在浏览器中访问,的确地址失效,只能将对应的原服务器地址换
下,试试
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
vi CentOS-Base.repo
换成下面的地址
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
然后再进行gcc组件的安装,提示完成。
3. 再次运行 1 中的命令,这次./configure没有出现问题,但运行make install的时候,提示git
安装要其它的组件。
yum install zlib-devel
yum install openssl-devel
yum install perl
yum install cpio
yum install expat-devel
yum install gettext-devel
4. 进行Curl组件的安装(如果已经安装,则不用了)
下载curl,解压,进行安装
tar xzvf curl-7.18.0.tar.gz
cd curl-7.18.0
./configure
make
make install
最后完成1的安装,这样android source下载的准备工作算是差不多了
5. 其它的步骤如android source一样,但官网提供的repo好像有点问题,每次运行repo命令时,
都会出错,后面在网上找个这个repo,运行时没有问题。
6. 最后是在每次运行repo sync时,都会出fatal: The remote end hung up unexpetedly error:Cannot
fetch../platform/bioni.这类问题,该问题修改.repo目录下的manifest.xml文件中的<remote name="aosp"
fetch="该处"/>修改为<remote name="aosp" fetch="http://android.googlesource.com"/>就好了