Android FrameWork Package packagename has no installation candidate

Ubuntu 下载编译FrameWork 源码的时候,apt-get 跑不起来,尝试获取根权限 进行如下操作 apt-get update apt-get 

 upgrade 错误提示依旧出现,源提示各种 404 我查看 Ubuntu 官网,看到了如下资料:


Ubuntu Night( http://ubuntu9.com ) 的Top mirror功能根据当前的网络情况和源健康状况不断地进行更新当前可用的源的信息,包括了Top fast/near/stable mirror,可以找到当前网络上所有可用的Ubuntu 镜像(即源),并按照平均下载速度和地理位置进行排名。而且,当你找到最适合你的源之后,还可以直接下载它的sources.list 文件,并可直接将它copy到/etc/apt/sources.list或者放在/etc/apt/souces.list.d目录下,非常的方便,无须苦苦找可用源。 


不同的网络状况连接以下源的速度不同, 建议在添加前手动验证以下源的连接速度(ping下就行),选择最快的源可以节省大批下载时间


首先我们需要备份一下我们之前的源列表文件,cp to 目录可选,这里只做参考

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup


我的 Ubuntu 版本比较低,对此我选择了适合自己的源(10.04)


deb http://archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse


其他还有很多的源资源就不一一介绍了,接下来我们需要添加源和更新源:


sudo gedit /etc/apt/sources.list


把刚才找到的新的源全部替换掉,就是把之前的全部清掉,粘贴完后保存


sudo apt-get update

sudo apt-get upgrade


......

Get:32 http://archive.ubuntu.com lucid-updates/restricted Sources [2,210B]                                            
Get:33 http://archive.ubuntu.com lucid-updates/universe Sources [110kB]                                               
Get:34 http://archive.ubuntu.com lucid-updates/multiverse Sources [5,829B]                                            
Get:35 http://archive.ubuntu.com lucid-proposed/main Packages [236kB]                                                 
Get:36 http://archive.ubuntu.com lucid-proposed/restricted Packages [28B]                                             
Get:37 http://archive.ubuntu.com lucid-proposed/universe Packages [5,379B]                                            
Get:38 http://archive.ubuntu.com lucid-proposed/multiverse Packages [28B]                                             
Get:39 http://archive.ubuntu.com lucid-proposed/main Sources [137kB]                                                  
Get:40 http://archive.ubuntu.com lucid-proposed/restricted Sources [28B]                                              
Get:41 http://archive.ubuntu.com lucid-proposed/universe Sources [1,031B]                                             
Get:42 http://archive.ubuntu.com lucid-proposed/multiverse Sources [28B]                                              
Get:43 http://archive.ubuntu.com lucid-backports/main Packages [16.9kB]                                               
Get:44 http://archive.ubuntu.com lucid-backports/restricted Packages [14B]                                            
Get:45 http://archive.ubuntu.com lucid-backports/universe Packages [55.7kB]                                           
Get:46 http://archive.ubuntu.com lucid-backports/multiverse Packages [1,378B]                                         
Get:47 http://archive.ubuntu.com lucid-backports/main Sources [9,162B]                                                
Get:48 http://archive.ubuntu.com lucid-backports/restricted Sources [14B]                                             
Get:49 http://archive.ubuntu.com lucid-backports/universe Sources [24.5kB]                                            
Get:50 http://archive.ubuntu.com lucid-backports/multiverse Sources [1,633B]                                          
Fetched 14.7MB in 5min 14s (46.6kB/s)                                                                               

耗时5分多,我把源给更新完了,我 Ping 了下 net 发现还行,下载速度应该很赞

下了一个 curl 包:

root@ubuntu:/etc/apt# sudo apt-get install curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  curl
0 upgraded, 1 newly installed, 0 to remove and 1177 not upgraded.
Need to get 210kB of archives.
After this operation, 324kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com lucid-security/main curl 7.19.7-1ubuntu1.11 [210kB]
Fetched 210kB in 6s (33.9kB/s)                                                                                        
Selecting previously deselected package curl.
(Reading database ... 114040 files and directories currently installed.)
Unpacking curl (from .../curl_7.19.7-1ubuntu1.11_i386.deb) ...
Processing triggers for man-db ...
Setting up curl (7.19.7-1ubuntu1.11) ...
root@ubuntu:/etc/apt# 
Reading package lists... Done
root@ubuntu:/etc/apt# 


之后继续安装一个下载 FrameWork 源码的 git-core 包


root@ubuntu:/etc/apt# sudo apt-get install git-core
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  upower libupower-glib1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  consolekit fontconfig-config gdm ifupdown indicator-applet indicator-applet-session initramfs-tools
  initramfs-tools-bin libasound2 libatk1.0-0 libc-bin libc-dev-bin libc6 libc6-dev libc6-i686 libdb4.8
  libdbus-glib-1-2 libdevkit-power-gobject1 libdigest-sha1-perl libdrm-nouveau1 libdrm-radeon1 liberror-perl
  libfontconfig1 libglib2.0-0 libindicator0 libnih-dbus1 libnih1 libperl5.10 libplymouth2 libpopt0 libudev0
  libupower-glib1 libxklavier16 mountall patch perl perl-base perl-modules plymouth udev upower upstart
Suggested packages:
  uswsusp gok git-doc git-arch git-cvs git-svn git-email git-daemon-run git-gui gitk gitweb glibc-doc diffutils-doc
  perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl watershed
Recommended packages:
  indicator-sound indicator-application indicator-me manpages-dev plymouth-theme-ubuntu-text plymouth-theme
The following packages will be REMOVED:
  devicekit-power gnome-power-manager indicator-session ubuntu-desktop usplash usplash-theme-ubuntu
The following NEW packages will be installed:
  git-core initramfs-tools-bin libdb4.8 libdigest-sha1-perl libdrm-nouveau1 liberror-perl libindicator0 libnih-dbus1
  libnih1 libplymouth2 libupower-glib1 libxklavier16 patch plymouth upower
The following packages will be upgraded:
  consolekit fontconfig-config gdm ifupdown indicator-applet indicator-applet-session initramfs-tools libasound2
  libatk1.0-0 libc-bin libc-dev-bin libc6 libc6-dev libc6-i686 libdbus-glib-1-2 libdevkit-power-gobject1
  libdrm-radeon1 libfontconfig1 libglib2.0-0 libperl5.10 libpopt0 libudev0 mountall perl perl-base perl-modules udev
  upstart
28 upgraded, 15 newly installed, 6 to remove and 1145 not upgraded.
Need to get 32.8MB of archives.
After this operation, 5,808kB of additional disk space will be used.
Do you want to continue [Y/n]? 


速度还是挺不错的!!剩下的就是下载和处理 repo 和 python 等一些相关支持的工具和包,另外由于FrameWork 下载时间太过长,就不介绍了

主要是解决Ubuntu 低版本源不能用的问题,还在绕弯路的朋友可以看过来,不要到处看无关紧要的博客和资料,那样只会被各种误导!!

有时候找官网资料是最靠谱的


还有就是,推广一下,我的CSDN 教材,就是希望更多朋友认识我,然后一起讨论开发问题,虽然平时很忙,无暇多回复各位的问题,在此表示抱歉!

教材地址:http://edu.csdn.net/course/detail/420

但那是还是依旧有很多网友默默的支持我,我表示很感谢,真的!!所有我以后的博客或者教程会更用心的去录制,和撰写,谢谢各位小伙伴的支持!!

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Engineer-Jsp

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值