AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1129476
Accepted
Martin Bramwell
Martin Bramwell
Asked: 2019-03-29 10:01:46 +0800 CST2019-03-29 10:01:46 +0800 CST 2019-03-29 10:01:46 +0800 CST

由于版本阻止的依赖关系,无法安装 libnotify-dev

  • 772

步骤1 ...

sudo apt-get -y update;
sudo apt-get -y upgrade;
sudo apt-get -y dist-upgrade;
sudo apt-get -y clean;
sudo apt-get -y autoremove;

... 结果是 ...

Hit:1 https://download.sublimetext.com apt/stable/ InRelease
Hit:2 http://linux.teamviewer.com/deb stable InRelease                                                                                                 
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease                                                                                             
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                           
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                      
Hit:7 http://mirror.clibre.uqam.ca/ubuntu bionic InRelease
Hit:8 http://mirror.clibre.uqam.ca/ubuntu bionic-updates InRelease
Hit:9 http://mirror.clibre.uqam.ca/ubuntu bionic-backports InRelease
Hit:10 http://mirror.clibre.uqam.ca/ubuntu bionic-security InRelease
Reading package lists... Done 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

第2步 ...

sudo apt install libnotify-dev

... 结果是 ...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 libnotify-dev : Depends: libglib2.0-dev (>= 2.26) but it is not going to be installed
                 Depends: libgdk-pixbuf2.0-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

步骤#3 ...

sudo aptitude install libnotify-dev

... 结果是 ...

The following NEW packages will be installed:
  gcc-8-base:i386{ab} libblkid1:i386{ab} libc6:i386{a} libelf1:i386{a} libffi6:i386{a} libgcc1:i386{ab} libgdk-pixbuf2.0-dev{a} 
  libglib2.0-0:i386{ab} libglib2.0-bin:i386{ab} libglib2.0-dev{ab} libglib2.0-dev-bin{a} libmount1:i386{ab} libnotify-dev libpcre16-3{a} 
  libpcre3:i386{a} libpcre3-dev{a} libpcre32-3{a} libpcrecpp0v5{a} libpng-dev{a} libpng-tools{a} libpthread-stubs0-dev{a} libselinux1:i386{a} 
  libuuid1:i386{ab} libx11-dev{ab} libx11-doc{a} libxau-dev{a} libxcb1-dev{a} libxdmcp-dev{a} pkg-config{a} x11proto-core-dev{a} x11proto-dev{a} 
  xorg-sgml-doctools{a} xtrans-dev{a} zlib1g:i386{a} zlib1g-dev{a} 
0 packages upgraded, 35 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.6 MB of archives. After unpacking 48.7 MB will be used.
The following packages have unmet dependencies:
 libmount1 : Breaks: libmount1:i386 (!= 2.31.1-0.4ubuntu3.2) but 2.31.1-0.4ubuntu3.1 is to be installed
 libmount1:i386 : Breaks: libmount1 (!= 2.31.1-0.4ubuntu3.1) but 2.31.1-0.4ubuntu3.2 is installed
 gcc-8-base : Breaks: gcc-8-base:i386 (!= 8.2.0-1ubuntu2~18.04) but 8-20180414-1ubuntu2 is to be installed
 gcc-8-base:i386 : Breaks: gcc-8-base (!= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed
 libgcc1 : Breaks: libgcc1:i386 (!= 1:8.2.0-1ubuntu2~18.04) but 1:8-20180414-1ubuntu2 is to be installed
 libgcc1:i386 : Breaks: libgcc1 (!= 1:8-20180414-1ubuntu2) but 1:8.2.0-1ubuntu2~18.04 is installed
 libblkid1 : Breaks: libblkid1:i386 (!= 2.31.1-0.4ubuntu3.2) but 2.31.1-0.4ubuntu3.1 is to be installed
 libblkid1:i386 : Breaks: libblkid1 (!= 2.31.1-0.4ubuntu3.1) but 2.31.1-0.4ubuntu3.2 is installed
 libuuid1 : Breaks: libuuid1:i386 (!= 2.31.1-0.4ubuntu3.2) but 2.31.1-0.4ubuntu3.1 is to be installed
 libuuid1:i386 : Breaks: libuuid1 (!= 2.31.1-0.4ubuntu3.1) but 2.31.1-0.4ubuntu3.2 is installed
 libglib2.0-bin : Conflicts: libglib2.0-bin:i386 but 2.56.1-2ubuntu1 is to be installed
 libglib2.0-bin:i386 : Conflicts: libglib2.0-bin but 2.56.3-0ubuntu0.18.04.1 is installed
 libglib2.0-dev : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.56.3-0ubuntu0.18.04.1 is installed
 libx11-dev : Depends: libx11-6 (= 2:1.6.4-3) but 2:1.6.4-3ubuntu0.1 is installed
 libglib2.0-0 : Breaks: libglib2.0-0:i386 (!= 2.56.3-0ubuntu0.18.04.1) but 2.56.1-2ubuntu1 is to be installed
 libglib2.0-0:i386 : Breaks: libglib2.0-0 (!= 2.56.1-2ubuntu1) but 2.56.3-0ubuntu0.18.04.1 is installed
open: 44; closed: 1251; defer: 26; conflict: 34                                                                                                        

The following actions will resolve these dependencies:

      Keep the following packages at their current version:
1)      gcc-8-base:i386 [Not Installed]                    
2)      libblkid1:i386 [Not Installed]                     
3)      libc6:i386 [Not Installed]                         
4)      libelf1:i386 [Not Installed]                       
5)      libffi6:i386 [Not Installed]                       
6)      libgcc1:i386 [Not Installed]                       
7)      libgdk-pixbuf2.0-dev [Not Installed]               
8)      libglib2.0-0:i386 [Not Installed]                  
9)      libglib2.0-bin:i386 [Not Installed]                
10)     libglib2.0-dev [Not Installed]                     
11)     libmount1:i386 [Not Installed]                     
12)     libnotify-dev [Not Installed]                      
13)     libpcre3:i386 [Not Installed]                      
14)     libselinux1:i386 [Not Installed]                   
15)     libuuid1:i386 [Not Installed]                      
16)     libx11-dev [Not Installed]                         
17)     zlib1g:i386 [Not Installed]                        



Accept this solution? [Y/n/q/?] y

...但接受只会让我...

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

版本:

lsb_release -a

...显示...

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic

我该如何解决这个问题并让软件包安装?

更新 2019-03-28 18:05 EST

也试过...

sudo apt install libglib2.0-dev libgdk-pixbuf2.0-dev

...得到...

 libgdk-pixbuf2.0-dev : Depends: libx11-dev but it is not going to be installed
 libglib2.0-dev :       Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.56.3-0ubuntu0.18.04.1 is to be installed
                        Depends: libglib2.0-bin (= 2.56.1-2ubuntu1)

更新 2019-03-29 06:45 EST

根据@fkraiem 的问题:

apt-cache policy libglib2.0-dev

...产生...

libglib2.0-dev:
  Installed: (none)
  Candidate: 2.56.1-2ubuntu1
  Version table:
     2.56.1-2ubuntu1 500
        500 http://mirror.clibre.uqam.ca/ubuntu bionic/main amd64 Packages

根据@Mamayogi 表达的担忧:

dpkg --print-architecture; dpkg --print-foreign-architectures;

...产生...

amd64
i386

...但是,尽管如此,该命令sudo apt install libnotify-dev给出了与最初相同的“未满足的依赖关系”结果。

apt aptitude libnotify 18.04
  • 1 1 个回答
  • 1010 Views

1 个回答

  • Voted
  1. Best Answer
    fkraiem
    2019-03-30T22:32:21+08:002019-03-30T22:32:21+08:00

    不可用依赖项的一个可能原因,特别是当所需的包是官方包时,是一个过时的存档镜像,就像这里的情况一样。可以在此处查看所有可用存档镜像及其更新状态的列表;如果您的镜子已过时,请尝试另一个。

    • 1

相关问题

  • 是否可以说出我安装的哪些软件包不在原版安装中?

  • 如何删除 PPA?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

  • 如何更改通知的显示时长?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve