如何解决apt-get中Unmet dependencies问题
来源:互联网 发布:域名备案查询 编辑:程序博客网 时间:2024/05/22 03:43
简介
新安装的Ubuntu 16.04 TLS系统,由于apt-get upgrade过程中断,导致依赖损坏;安装新的包时,提示Unmet dependencies问题。本文记录了问题的排查方法及解决方案问题描述
系统由于未知原因,在系统重启后,发现安装包时提示了Unmet dependencies提示,无法正常安装。
hadoop@hadoop-virtualbox:~$ sudo apt-get install openjdk-8-jdkReading package lists... DoneBuilding dependency treeReading state information... Doneopenjdk-8-jdk is already the newest version (8u131-b11-2ubuntu1.16.04.3).You might want to run 'apt-get -f install' to correct these:The following packages have unmet dependencies: linux-image-extra-4.10.0-35-generic : Depends: linux-image-4.10.0-35-generic but it is not going to be installedE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
根据问题提示信息,是由于所依赖的包linux-image-4.10.0-35-generic并没有被正确安装导致。linux-image-x.x.x是内核文件,从提示信息上看,应该是升级过程中断导致的问题。查看内核当前版本信息发现当前运行的版本为4.10.0-28-generic。确实与提示的内核信息不一致,确认了问题所在。hadoop@hadoop-virtualbox:~$ uname -r4.10.0-28-generic
解决方案
根据提示信息,运行apt-get -f install来修复问题,详细的-f选项的意义可以查看manual手册。这里列出了选项的具体含义:-f, --fix-brokenFix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system. It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dpkg --remove to eliminate some of the offending packages). Use of this option together with -m may produce an error in some situations. Configuration Item: APT::Get::Fix-Broken.接下来我们执行修复命令,并重新执行更新和升级,确保完整修复问题。
sudo apt --fix-broken installsudo apt-get updatesudo apt-get upgrade
阅读全文
0 0
- 如何解决apt-get中Unmet dependencies问题
- Ubuntu apt-get install错误:unmet dependencies
- E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
- E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
- apt-get install nethogs安装出现E: Unmet dependencies. Try 'apt-get -f install' with no packages (or spe
- ubuntu安装fcitx失败Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)
- 关于ubuntu 更换成国内源之后,apt-get 出现The following packages have unmet dependencies:的解决方法
- 如何解决ubuntu下apt-get install g++依赖问题
- REDHAT解决apt-get问题
- REDHAT解决apt-get问题
- Ubuntu下面包依赖损坏的解决unmet dependencies
- 如何删除在Ubuntu server 12.04安装中设置的http代理 (解决apt-get update 出错问题)
- 如何删除在Ubuntu安装中设置的http代理 (解决apt-get update 出错问题)
- ROS安装时packages have unmet dependencies问题
- 问题之~The following packages have unmet dependencies: openssh
- ubuntu_install问题:The following packages have unmet dependencies:
- 解决ubuntu无法apt-get的问题
- 解决 apt-get install 依赖问题
- java String类
- Qt数据类型转换
- Lucene5 学习笔记(3) —— 重用 IndexReader 和常用的搜索方法
- SQL优化索引
- ubuntu16.04 标题栏显示网速、CPU使用率
- 如何解决apt-get中Unmet dependencies问题
- C#220课的主要内容
- 微信小程序WXML之列表渲染
- C++extern关键字使用总结
- BZOJ[2464]中山市选[2009]小明的游戏 SPFA
- bzoj 1786 [Ahoi2008]Pair 配对
- C++类对象共享数据的5种实现方法
- Spring MVC-使用Java类配置新建项目
- Python学习笔记(三):函数