今天在安装软件的时候出现了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

Ubuntu apt-get: Package has no installation candidate的更多相关文章

  1. Ubuntu 出现apt-get: Package has no installation candidate问题

    今天在安装软件的时候出现了Package has no installation candidate的问题,如: #  apt-get install <packagename> Read ...

  2. Ubuntu出现apt-get: Package has no installation candidate问题

    今天在安装 vim 的时候出现了 Package 'vim' has no installation candidate的问题 解决方法如下:# apt-get update# apt-get upg ...

  3. Ubuntu无法安装vim怎么办?(Ubuntu 出现apt-get: Package has no installation candidate问题)

    apt-get install vim 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 有一些软件包无法被安装.如果您用的是不稳定(unstable)发行版, ...

  4. Package has no installation candidate解决方法

    今天在安装软件的时候出现了Package has no installation candidate的问题,如:# apt-get install <packagename>Reading ...

  5. ubuntu更新源(Package has no installation candidate 的问题)

    最近将公司的台式机安装了ubuntu16.04,安装之后,使用apt-get install openssh-server 发现出现:Package 'openssh-server' has no i ...

  6. linux apt-get install 错误: Package has no installation candidate

    sudo apt-get install vim 在安装vim时报如下错误: Error accoured: This may mean that the package is missing, ha ...

  7. docker安装问题:E: Package 'docker-ce' has no installation candidate

    我的环境是在vm虚拟机中,Ubuntu17.04 前期安装步骤不过多介绍,下面这个博客就很好 ubuntu16.10安装docker17.03.0-ce并配置国内源和加速器 http://www.cn ...

  8. linux 报错:E: Package 'libmemcached' has no installation candidate

    linux 报错:E: Package 'libmemcached' has no installation candidate 网上查资料说是软件安装源没有这个软件,需要添加软件源. 1.备份源列表 ...

  9. E: Package xxx has no installation candidate成功解决

    E: Package 'php5' has no installation candidate 问题 分析 首先这个问题的最主要的原因就是因为当前Linux系统的下载源中找不到相应的文件,所以说我们需 ...

随机推荐

  1. ubuntu12.04管理员账户登录不了桌面,仅仅能客人会话登录

    ubuntu12.04管理员账户登录不了桌面,仅仅能客人会话登录 求助!!ubuntu12.04管理员账户登录不了桌面,仅仅能客人会话登录. 登录管理员账户时,输入password后,一直在登录界面循 ...

  2. WebForm MapPageRoute 路由配置

    WebForm MapPageRoute 路由配置   MapPageRoute 应该是 ASP.NET 4.0 中的东西,但现在我是第一次使用它,使用场景是:MVC 混合使用 WebForm,然后对 ...

  3. Post和Get差异

    GET和POST差别例如以下: 1,生成方式 get方式有四种:1)直接在URL地址栏中输入URL.2)网页中的超链接.3)form中method为get. 4)form中method为空时.默认是g ...

  4. (C语言)共用体union的使用方法举例

    曾经在学校学习C语言的时候一直搞不懂那个共用体union有什么用的.工作之后才发现它的一些妙用,现举比例如以下: 1. 为了方便看懂代码. 比方说想写一个3 * 3的矩阵,能够这样写: [ 注:以下用 ...

  5. selenium之多线程启动grid分布式测试框架封装(三)

    七.工具类,线程监控器类创建 utils包中,创建java类:RemoteThreadStatusMonitor.java package com.lingfeng.utils; /** * 此监控器 ...

  6. centos安装zabbix集群监控(亲测无坑版)

    一. 安装lemp环境 下载安装包:wget bbs.linuxtone.org/docs/autoinstall/lemp_auto_v1.0.6.tar.gz 包解压:tar zxvf lemp_ ...

  7. MVC多模板支持

    参考: ASP.NET MVC:多模板支持

  8. leetcode第25题--Remove Element

    problem: Given an array and a value, remove all instances of that value in place and return the new ...

  9. Best JavaScript Tools for Developers

    JavaScript solves multiple purposes; it helps you to create interactive websites, web applications, ...

  10. serialVersionUID行动

    ORIGINAL:未知 Java断类的serialVersionUID来验证版本号一致性的.在进行反序列化时,JVM会把传来的字节流中的serialVersionUID与本地对应实体(类)的seria ...