udo aptitude install python-dev报错:下列软件包有未满足的依赖关系: python-dev : 依赖: libpython-dev (= 2.7.5-5ubuntu3) 但是它将不会被安装 依赖: python2.7-dev (>= 2.7.5-1~) 但是它将不会被安装E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。.aptitude工具可以解决:sudo apt-get install aptitude liang@liang:~$ sudo apt-get install aptitude正在读取软件包列表... 完成正在分析软件包的依赖关系树正在读取状态信息... 完成下列软件包是自动安装的并且现在不需要了:libllvm3.6 libntdb1 linux-headers-4.2.0-27 linux-headers-4.2.0-27-genericlinux-image-4.2.0-27-generic linux-image-extra-4.2.0-27-generic python-ntdbwine-devel wine-devel-amd64 wine-devel-i386:i386Use 'apt-get autoremove' to remove them.将会安装下列额外的软件包:aptitude-common libboost-iostreams1.54.0 libcwidget3 libept1.4.12建议安装的软件包:aptitude-doc-en aptitude-doc tasksel debtags libcwidget-dev下列【新】软件包将被安装:aptitude aptitude-common libboost-iostreams1.54.0 libcwidget3 libept1.4.12升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 3 个软件包未被升级。需要下载 2,549 kB 的软件包。解压缩后会消耗掉 10.7 MB 的额外空间。您希望继续执行吗? [Y/n] Y获取:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libboost-iostreams1.54.0 amd64 1.54.0-4ubuntu3 [29.1 kB]获取:2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libept1.4.12 amd64 1.0.12 [142 kB]获取:3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main aptitude-common all 0.6.8.2-1ubuntu4 [700 kB]获取:4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libcwidget3 amd64 0.5.16-3.5ubuntu1 [307 kB]获取:5 http://cn.archive.ubuntu.com/ubuntu/ trusty/main aptitude amd64 0.6.8.2-1ubuntu4 [1,371 kB]下载 2,549 kB,耗时 11秒 (228 kB/s) 正在选中未选择的软件包 libboost-iostreams1.54.0:amd64。(正在读取数据库 ... 系统当前共安装有 248647 个文件和目录。)正准备解包 .../libboost-iostreams1.54.0_1.54.0-4ubuntu3_amd64.deb ...正在解包 libboost-iostreams1.54.0:amd64 (1.54.0-4ubuntu3) ...正在选中未选择的软件包 libept1.4.12:amd64。正准备解包 .../libept1.4.12_1.0.12_amd64.deb ...正在解包 libept1.4.12:amd64 (1.0.12) ...正在选中未选择的软件包 aptitude-common。正准备解包 .../aptitude-common_0.6.8.2-1ubuntu4_all.deb ...正在解包 aptitude-common (0.6.8.2-1ubuntu4) ...正在选中未选择的软件包 libcwidget3。正准备解包 .../libcwidget3_0.5.16-3.5ubuntu1_amd64.deb ...正在解包 libcwidget3 (0.5.16-3.5ubuntu1) ...正在选中未选择的软件包 aptitude。正准备解包 .../aptitude_0.6.8.2-1ubuntu4_amd64.deb ...正在解包 aptitude (0.6.8.2-1ubuntu4) ...正在处理用于 man-db (2.6.7.1-1ubuntu1) 的触发器 ...正在设置 libboost-iostreams1.54.0:amd64 (1.54.0-4ubuntu3) ...正在设置 libept1.4.12:amd64 (1.0.12) ...正在设置 aptitude-common (0.6.8.2-1ubuntu4) ...正在设置 libcwidget3 (0.5.16-3.5ubuntu1) ...正在设置 aptitude (0.6.8.2-1ubuntu4) ...update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in 自动模式正在处理用于 libc-bin (2.19-0ubuntu6.13) 的触发器 ...liang@liang:~$ sudo aptitude install python-dev 下列“新”软件包将被安装。 libexpat1-dev{ab} libpython-dev{a} libpython2.7-dev{ab} python-dev python2.7-dev{ab} 下列软件包将被“删除”: libllvm3.6{u} libntdb1{u} python-ntdb{u} wine-devel{u} wine-devel-amd64{u} wine-devel-i386:i386{u} 0 个软件包被升级,新安装 5 个, 6 个将被删除, 同时 3 个将不升级。需要获取 22.4 MB 的存档。 解包后将释放 370 MB。下列软件包存在未满足的依赖关系: libexpat1-dev : 依赖: libexpat1 (= 2.1.0-4ubuntu1) 但是 2.1.0-4ubuntu1.3 已安装。 libpython2.7-dev : 依赖: libpython2.7-stdlib (= 2.7.6-8) 但是 2.7.6-8ubuntu0.3 已安装。 依赖: libpython2.7 (= 2.7.6-8) 但是 2.7.6-8ubuntu0.3 已安装。 python2.7-dev : 依赖: python2.7 (= 2.7.6-8) 但是 2.7.6-8ubuntu0.3 已安装。 依赖: libpython2.7 (= 2.7.6-8) 但是 2.7.6-8ubuntu0.3 已安装。下列动作将解决这些依赖关系: 保持 下列软件包于其当前版本:1) libexpat1-dev [未安装的] 2) libpython-dev [未安装的] 3) libpython2.7-dev [未安装的]4) python-dev [未安装的] 5) python2.7-dev [未安装的] 是否接受该解决方案?[Y/n/q/?] n下列动作将解决这些依赖关系: 删除 下列软件包: 1) libcairo-gobject2:i386 2) libcairo2:i386 3) libexpat1:i386 4) libfontconfig1:i386 5) libgd3:i386 6) libgl1-mesa-dri-lts-xenial:i386 7) libgl1-mesa-glx-lts-xenial:i386 8) libglu1-mesa:i386 9) libgphoto2-6:i386 10) libgtk-3-0:i386 11) libpangocairo-1.0-0:i386 12) libpangoft2-1.0-0:i386 13) libsane:i386 14) teamviewer:i386 15) wine-staging 16) wine-staging-i386:i386 17) winehq-staging 降级 下列软件包: 18) libexpat1 [2.1.0-4ubuntu1.3 (now) -> 2.1.0-4ubuntu1 (trusty)] 19) libpython2.7 [2.7.6-8ubuntu0.3 (now) -> 2.7.6-8 (trusty)] 20) libpython2.7-minimal [2.7.6-8ubuntu0.3 (now) -> 2.7.6-8 (trusty)]21) libpython2.7-stdlib [2.7.6-8ubuntu0.3 (now) -> 2.7.6-8 (trusty)] 22) python2.7 [2.7.6-8ubuntu0.3 (now) -> 2.7.6-8 (trusty)] 23) python2.7-minimal [2.7.6-8ubuntu0.3 (now) -> 2.7.6-8 (trusty)] 是否接受该解决方案?[Y/n/q/?] y下列软件包将被“降级”: libexpat1 libpython2.7 libpython2.7-minimal libpython2.7-stdlib python2.7 python2.7-minimal 下列“新”软件包将被安装。 libexpat1-dev{a} libpython-dev{a} libpython2.7-dev{a} python-dev python2.7-dev{a} 下列软件包将被“删除”: libasn1-8-heimdal:i386{u} libasound2:i386{u} libasound2-plugins:i386{u} libasyncns0:i386{u} libatk-bridge2.0-0:i386{u} libatk1.0-0:i386{u} libatspi2.0-0:i386{u} libavahi-client3:i386{u} libavahi-common-data:i386{u} libavahi-common3:i386{u} libcairo-gobject2:i386{a} libcairo2:i386{a} libcapi20-3{u} libcapi20-3:i386{u} libcgmanager0:i386{u} libcolord1:i386{u} libcups2:i386{u} libdatrie1:i386{u} libdrm-amdgpu1:i386{u} libdrm-intel1:i386{u} libdrm-nouveau2:i386{u} libdrm-radeon1:i386{u} libdrm2:i386{u} libedit2:i386{u} libelf1:i386{u} libexif12:i386{u} libexpat1:i386{a} libffi6:i386{u} libflac8:i386{u} libfontconfig1:i386{a} libfreetype6:i386{u} libgcrypt11:i386{u} libgd3:i386{a} libgdk-pixbuf2.0-0:i386{u} libgl1-mesa-dri-lts-xenial:i386{a} libgl1-mesa-glx-lts-xenial:i386{a} libglapi-mesa-lts-xenial:i386{u} libglib2.0-0:i386{u} libglu1-mesa:i386{a} libgnutls26:i386{u} libgpg-error0:i386{u} libgphoto2-6:i386{a} libgphoto2-port10:i386{u} libgraphite2-3:i386{u} libgsm1:i386{u} libgssapi-krb5-2:i386{u} libgssapi3-heimdal:i386{u} libgstreamer-plugins-base1.0-0:i386{u} libgstreamer1.0-0:i386{u} libgtk-3-0:i386{a} libharfbuzz0b:i386{u} libhcrypto4-heimdal:i386{u} libheimbase1-heimdal:i386{u} libheimntlm0-heimdal:i386{u} libhx509-5-heimdal:i386{u} libice6:i386{u} libieee1284-3:i386{u} libjack-jackd2-0:i386{u} libjasper1:i386{u} libjbig0:i386{u} libjpeg-turbo8:i386{u} libjpeg62:i386{u} libjpeg8:i386{u} libjson-c2:i386{u} libk5crypto3:i386{u} libkeyutils1:i386{u} libkrb5-26-heimdal:i386{u} libkrb5-3:i386{u} libkrb5support0:i386{u} liblcms2-2:i386{u} libldap-2.4-2:i386{u} libllvm3.6{u} libllvm3.8v4:i386{u} libltdl7:i386{u} libmpg123-0{u} libmpg123-0:i386{u} libntdb1{u} libodbc1{u} libodbc1:i386{u} libogg0:i386{u} libopenal1:i386{u} liborc-0.4-0:i386{u} libosmesa6{u} libosmesa6:i386{u} libp11-kit0:i386{u} libpango-1.0-0:i386{u} libpangocairo-1.0-0:i386{a} libpangoft2-1.0-0:i386{a} libpcap0.8:i386{u} libpciaccess0:i386{u} libpixman-1-0:i386{u} libpng12-0:i386{u} libpulse0:i386{u} libroken18-heimdal:i386{u} libsamplerate0:i386{u} libsane:i386{a} libsasl2-2:i386{u} libsasl2-modules:i386{u} libsasl2-modules-db:i386{u} libsm6:i386{u} libsndfile1:i386{u} libspeexdsp1:i386{u} libsqlite3-0:i386{u} libssl1.0.0:i386{u} libstdc++6:i386{u} libtasn1-6:i386{u} libthai0:i386{u} libtiff5:i386{u} libtxc-dxtn-s2tc0:i386{u} libudev1:i386{u} libusb-1.0-0:i386{u} libv4l-0:i386{u} libv4lconvert0:i386{u} libva-drm1{u} libva-drm1:i386{u} libva-x11-1{u} libva-x11-1:i386{u} libva1{u} libva1:i386{u} libvorbis0a:i386{u} libvorbisenc2:i386{u} libvpx1:i386{u} libwayland-client0:i386{u} libwayland-cursor0:i386{u} libwind0-heimdal:i386{u} libwrap0:i386{u} libx11-6:i386{u} libx11-xcb1:i386{u} libxau6:i386{u} libxcb-dri2-0:i386{u} libxcb-dri3-0:i386{u} libxcb-glx0:i386{u} libxcb-present0:i386{u} libxcb-render0:i386{u} libxcb-shm0:i386{u} libxcb-sync1:i386{u} libxcb1:i386{u} libxcomposite1:i386{u} libxcursor1:i386{u} libxdamage1:i386{u} libxdmcp6:i386{u} libxext6:i386{u} libxfixes3:i386{u} libxi6:i386{u} libxinerama1:i386{u} libxkbcommon0:i386{u} libxml2:i386{u} libxpm4:i386{u} libxrandr2:i386{u} libxrender1:i386{u} libxshmfence1:i386{u} libxslt1.1:i386{u} libxtst6:i386{u} libxxf86vm1:i386{u} python-ntdb{u} teamviewer:i386{a} wine-devel{u} wine-devel-amd64{u} wine-devel-i386:i386{u} wine-staging{a} wine-staging-amd64{u} wine-staging-i386:i386{a} winehq-staging{a} 0 个软件包被升级,新安装 5 个, 6 个被降级, 163 个将被删除, 同时 2 个将不升级。需要获取 27.1 MB 的存档。 解包后将释放 1,053 MB。您要继续吗?[Y/n/?] Y继续安装就行 了,