今天在安装软件的时候出现了Package has no installation candidate的问题,如:

#  apt-get install <packagename>
Reading package lists... Done
Building dependency tree... Done
Package aptitude is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package <packagename> has no installation candidate

解决方法如下:

apt-get update
apt-get upgrade
apt-get install <packagename>

这样就可以正常使用apt-get了~

添加第三方地址:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update

如果以上步骤失败,可以试试以下方法:参考(http://unix.stackexchange.com/questions/140119/every-package-has-no-installation-candidate

1. 修改 /etc/apt/sources.list 前,注释所有行

sudo vim /etc/apt/sources.list

2. 添加以下安装源, 测试可用

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

最新文章

  1. 模拟apache commons dbutils 实现自己的BeanListHandler(回调应用)
  2. HDU 1171 背包
  3. JS实现颜色值的转换
  4. SVN安装详解
  5. GitHub使用教程for Eclipse
  6. static在类中的定义,和enum的用法
  7. 你可能把A/B测试做错了
  8. QT5 &amp;&amp; VS2013配置
  9. 跟随上次的socket sever,追加Tcplistener、Httplistener的server
  10. javascript - 个人笔记汇总
  11. Introducing Outflux: a smart way out of InfluxDB
  12. django ajax提交form表单数据
  13. 中文汉字和常见英文数字等的unicode编码范围
  14. 529. Minesweeper扫雷游戏
  15. 第15课 右值引用(2)_std::move和移动语义
  16. uuid唯一吗
  17. Linux下进行程序设计时,关于库的使用:
  18. 1349: Taking Pebbles (博弈 打表找规律)
  19. CSS级联样式表-css选择器
  20. C# 中利用 Conditional 定义条件方法

热门文章

  1. 初识EPC
  2. unity多边形uv地图
  3. JSP+Java+properties+FileInputStream文件读写,JSP页面读取properties文件
  4. C程序中引用自定义的C函数模块
  5. 异步提交form的时候利用jQuery validate实现表单验证
  6. jQuery.form Ajax无刷新上传错误 (jQuery.handleError is not a function) 解决方案
  7. 2014由于在myeclipse5.5.1许可证
  8. Redis API与常用数据类型简介
  9. SpringMVC 国际化
  10. win7 64位系统装oracle11 提示环境变量path 值超过1023字符