Ubuntu 安装源配置:Unable to locate package & unmet dependencies
2016-09-04 00:26
661 查看
【解决场景】:
1.无法找到软件包apt-get install : E: Unable to locate package xxx
软件中心安装时显示:There isn't a software package called "Smile" in your current software resources
2.可以找到软件包,但无法自动安装依赖
The following packages have unmet dependencies: package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.
【解决方案】
以上问题都由源没有添加 安装源导致的。源所在位置:/etc/opt/sources.list
安装源模板:
deb MIRROR_URL/ubuntu/ UBUNTURELEASENAME main restricted universe multiverse deb MIRROR_URL/ubuntu/ UBUNTURELEASENAME-security main restricted universe multiverse deb MIRROR_URL/ubuntu/ UBUNTURELEASENAME-updates main restricted universe multiverse deb MIRROR_URL/ubuntu/ UBUNTURELEASENAME-proposed main restricted universe multiverse deb MIRROR_URL/ubuntu/ UBUNTURELEASENAME-backports main restricted universe multiverse deb-src MIRROR_URL/ubuntu/ UBUNTURELEASENAME main restricted universe multiverse deb-src MIRROR_URL/ubuntu/ UBUNTURELEASENAME-security main restricted universe multiverse deb-src MIRROR_URL/ubuntu/ UBUNTURELEASENAME-updates main restricted universe multiverse deb-src MIRROR_URL/ubuntu/ UBUNTURELEASENAME-proposed main restricted universe multiverse deb-src MIRROR_URL/ubuntu/ UBUNTURELEASENAME-backports main restricted universe multiverse
国内镜像地址:替换模板中的 MIRROR_URL
http://mirrors.sohu.com http://mirrors.163.com http://mirrors.aliyun.com http://ubuntu.uestc.edu.cn
ubuntu版本名:替换UBUNTURELEASENAME, eg : xenial
lsb_release -a
root@ubuntu:/etc/apt# lsb_release -a No LSB modules are available. Distributor ID:Ubuntu Description:Ubuntu 16.04 LTS Release:16.04 Codename:<strong>xenial #版本名</strong>
安装源示例:
使用时只需要替换 trusty为相应的ubuntu版本名,保存为sources.list,并替换/etc/opt/sources.list即可,注意要使用root权限 sudo cp sources.list /etc/opt/sources.list# /etc/apt/sources.list # cn deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://ubuntu.uestc.edu.cn/ubuntu/ trusty main restricted universe multiverse deb http://ubuntu.uestc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse deb http://ubuntu.uestc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse deb http://ubuntu.uestc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse deb http://ubuntu.uestc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://ubuntu.uestc.edu.cn/ubuntu/ trusty main restricted universe multiverse deb-src http://ubuntu.uestc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse deb-src http://ubuntu.uestc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://ubuntu.uestc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://ubuntu.uestc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse # office deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse # beta deb http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse # src deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse # beta deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse # US deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted deb http://us.archive.ubuntu.com/ubuntu/ trusty universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://archive.canonical.com/ubuntu trusty partner deb-src http://archive.canonical.com/ubuntu trusty partner deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted deb http://us.archive.ubuntu.com/ubuntu/ trusty-security universe deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security universe deb http://us.archive.ubuntu.com/ubuntu/ trusty-security multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security multiverse
相关文章推荐
- [11]_在Ubuntu16.04.3安装软件出现:E: Unable to locate package XXX 的解决办法
- 【转】ubuntu 11.04使用apt-get安装软件时一直提示E:unable to locate package
- Docker:Err http://archive.ubuntu.com trusty InRelease & E: Unable to locate package [name] 问题
- ubuntu下配置lamp环境遇到 Unable to locate package错误解决办法
- 在ubuntu系统下安装lrzsz出现“E: Unable to locate package ...”
- Ubuntu下apt安装总提示unable to locate package xxx
- 解决Ubuntu安装ftp服务出现的 Unable to locate package vsftpd问题(绝对有用!!!)
- ubuntu 11.04使用apt-get安装软件时一直提示E:unable to locate package的解决办法
- ubuntu 安装软件时出现 E: Unable to locate package vsftpd
- Ubuntu 12.04安装ssh出现“unable to locate package apenssh-server”
- 解决Ubuntu安装ftp时出现E: Unable to locate package vsftpd
- ubuntu 安装软件时出现 E: Unable to locate package vsftpd
- 树莓派(linux,ubuntu) 安装vnc服务端 Unable to locate package tightvnserver 解决
- 安装vim-full出错,提示unable to locate package vim-full
- Ubuntu11.10 E: Unable to locate package ubuntu-restricted-extras
- Ubuntu11.10 E: Unable to locate package ubuntu-restricted-extras
- Ubuntu : 解决更新时出现 Unable to locate package update(
- ubuntu系统安装过程中出现 unable local to package
- Ubuntu Server安装telnet服务时"Unable to locate package telnetd"解决方法
- 给Ubuntu更换成163的源(sources.list)Unable to locate package