前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ubuntu下解决Unment dependencies问题

ubuntu下解决Unment dependencies问题

作者头像
dogfei
发布2020-07-31 11:30:35
10.2K1
发布2020-07-31 11:30:35
举报
文章被收录于专栏:devops探索devops探索

问题介绍

代码语言:javascript
复制
# apt install libcurl3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 virtualbox-6.0 : Depends: libfontconfig1 (>= 2.11.94) but it is not going to be installed
                  Depends: libgl1-mesa-glx but it is not going to be installed or
                           libgl1
                  Depends: libice6 (>= 1:1.0.0) but it is not going to be installed
                  Depends: libopus0 (>= 1.1) but it is not going to be installed
                  Depends: libsdl1.2debian (>= 1.2.11) but it is not going to be installed
                  Depends: libsm6 but it is not going to be installed
                  Depends: libvpx3 (>= 1.5.0) but it is not going to be installed
                  Depends: libx11-xcb1 but it is not going to be installed
                  Depends: libxcursor1 (> 1.1.2) but it is not going to be installed
                  Depends: libxmu6 but it is not going to be installed
                  Depends: libxrender1 but it is not going to be installed
                  Depends: libxt6 but it is not going to be installed
                  Recommends: libasound2
                  Recommends: libpulse0 but it is not going to be installed
                  Recommends: libsdl-ttf2.0-0 but it is not going to be installed
                  Recommends: gcc but it is not going to be installed
                  Recommends: make or
                              build-essential but it is not going to be installed or
                              dpkg-dev but it is not going to be installed
                  Recommends: binutils but it is not going to be installed
                  Recommends: pdf-viewer
                  Recommends: libgl1
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

造成这种问题的原因是因为在Ubuntu下,例如Ubuntu 14.04或者16.04一般是不会出现broken dependencies,或者出现unmet dependencies, 但是如果我们使用dpkg强制安装了某些deb包,或者在build-dep的是否手动更改了某些Packages的文件和版本时, 那么在再次使用apt-get install或者build-dep来安装packages的时就很可能出现上面出现过的问题。

解决办法

我们可以根据提示执行下命令,如果问题照旧,那我们尝试执行一下命令

first step

代码语言:javascript
复制
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade

second step

代码语言:javascript
复制
sudo apt-get update
sudo apt-get clean
sudo apt-get autoremove

third step

代码语言:javascript
复制
sudo apt --fix-broken install
sudo apt-get update && sudo apt-get upgrade
sudo dpkg --configure -a
sudo apt-get install -f

执行完以上步骤后,基本上问题便能解决

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-02-22,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 问题介绍
  • 解决办法
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档