当我尝试在新安装的 Ubuntu 14.04 上安装 g++-dev 时,出现此错误:
Les paquets suivants contiennent des dépendances non satisfaites :
xserver-xorg-dev-lts-utopic : Est en conflit avec: xserver-xorg-dev
E: Impossible de corriger les problèmes, des paquets défectueux sont en mode « garder en l'état ».
谁能帮我解决这个问题?
编辑 :
有英文输出
$ LANG=C sudo apt-get install g++-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcfg-dev' for regex 'g++-dev'
Note, selecting 'lua5.1-lpeg-dev' for regex 'g++-dev'
Note, selecting 'libclang-dev' for regex 'g++-dev'
Note, selecting 'packaging-dev' for regex 'g++-dev'
Note, selecting 'librgxg-dev' for regex 'g++-dev'
Note, selecting 'libgtg-dev' for regex 'g++-dev'
Note, selecting 'libecpg-dev' for regex 'g++-dev'
Note, selecting 'xserver-xorg-dev-lts-saucy' for regex 'g++-dev'
Note, selecting 'libghc-hxt-relaxng-dev-9.1.4-6441f' for regex 'g++-dev'
Note, selecting 'libghc-blaze-svg-dev-0.3.3.0-91cb1' for regex 'g++-dev'
Note, selecting 'erlang-dev' for regex 'g++-dev'
Note, selecting 'libini-config-dev' for regex 'g++-dev'
Note, selecting 'libcpg-dev' for regex 'g++-dev'
Note, selecting 'liblua5.1-lpeg-dev' for regex 'g++-dev'
Note, selecting 'libsyslog-ng-dev' for regex 'g++-dev'
Note, selecting 'dpkg-dev-el' for regex 'g++-dev'
Note, selecting 'libfontconfig-dev' for regex 'g++-dev'
Note, selecting 'syslog-ng-dev' for regex 'g++-dev'
Note, selecting 'eog-dev' for regex 'g++-dev'
Note, selecting 'libaudid3tag-dev' for regex 'g++-dev'
Note, selecting 'shhmsg-dev' for regex 'g++-dev'
Note, selecting 'libghc-bytestring-lexing-dev' for regex 'g++-dev'
Note, selecting 'libdballe-msg-dev' for regex 'g++-dev'
Note, selecting 'libunistring-dev' for regex 'g++-dev'
Note, selecting 'liboce-modeling-dev' for regex 'g++-dev'
Note, selecting 'libghc-boomerang-dev-1.4.0-3f832' for regex 'g++-dev'
Note, selecting 'libghc-bytestring-dev-0.10.0.2-0b661' for regex 'g++-dev'
Note, selecting 'lua5.1-rex-onig-dev' for regex 'g++-dev'
Note, selecting 'libghc-asn1-encoding-dev' for regex 'g++-dev'
Note, selecting 'libopencascade-modeling-dev' for regex 'g++-dev'
Note, selecting 'libogg-dev' for regex 'g++-dev'
Note, selecting 'libthepeg-dev' for regex 'g++-dev'
Note, selecting 'libhdf4g-dev' for regex 'g++-dev'
Note, selecting 'libmodplug-dev' for regex 'g++-dev'
Note, selecting 'libghc-web-routes-boomerang-dev-0.28.0-6f82d' for regex 'g++-dev'
Note, selecting 'libpam0g-dev' for regex 'g++-dev'
Note, selecting 'happycoders-libdbg-dev' for regex 'g++-dev'
Note, selecting 'libsmpeg-dev' for regex 'g++-dev'
Note, selecting 'libghc-dpkg-dev-0.0.3-ba83c' for regex 'g++-dev'
Note, selecting 'libghc-base64-bytestring-dev' for regex 'g++-dev'
Note, selecting 'libevtlog-dev' for regex 'g++-dev'
Note, selecting 'mesag-dev' for regex 'g++-dev'
Note, selecting 'libnetfilter-log-dev' for regex 'g++-dev'
Note, selecting 'libghc-pipes-bytestring-dev' for regex 'g++-dev'
Note, selecting 'golang-goget-ubuntu-touch-bootimg-dev' for regex 'g++-dev'
Note, selecting 'xserver-xorg-dev-lts-quantal' for regex 'g++-dev'
Note, selecting 'libghc-ekg-dev' for regex 'g++-dev'
Note, selecting 'libopencsg-dev' for regex 'g++-dev'
Note, selecting 'libcolorhug-dev' for regex 'g++-dev'
Note, selecting 'xserver-xorg-dev-lts-utopic' for regex 'g++-dev'
Note, selecting 'gpointing-device-settings' for regex 'g++-dev'
Note, selecting 'libwxsvg-dev' for regex 'g++-dev'
Note, selecting 'dpkg-dev' for regex 'g++-dev'
Note, selecting 'libdialog-dev' for regex 'g++-dev'
Note, selecting 'libdshconfig-dev' for regex 'g++-dev'
Note, selecting 'libconfig-dev' for regex 'g++-dev'
Note, selecting 'libghc-hxt-relaxng-dev' for regex 'g++-dev'
Note, selecting 'libming-dev' for regex 'g++-dev'
Note, selecting 'med-imaging-dev' for regex 'g++-dev'
Note, selecting 'libradiusclient-ng-dev' for regex 'g++-dev'
Note, selecting 'libgengameng-dev' for regex 'g++-dev'
Note, selecting 'libm17n-im-config-dev' for regex 'g++-dev'
Note, selecting 'librlog-dev' for regex 'g++-dev'
Note, selecting 'libglobus-gsi-sysconfig-dev' for regex 'g++-dev'
Note, selecting 'xorg-dev' for regex 'g++-dev'
Note, selecting 'libghc-pipes-bytestring-dev-2.0.0-a203a' for regex 'g++-dev'
Note, selecting 'libsamba-hostconfig-dev' for regex 'g++-dev'
Note, selecting 'libcableswig-dev' for regex 'g++-dev'
Note, selecting 'ntfs-3g-dev' for regex 'g++-dev'
Note, selecting 'openoffice.org-dev-doc' for regex 'g++-dev'
Note, selecting 'libtk-img-dev' for regex 'g++-dev'
Note, selecting 'libghc-utf8-string-dev-0.3.7-b85cc' for regex 'g++-dev'
Note, selecting 'libgnome-keyring-dev' for regex 'g++-dev'
Note, selecting 'lua5.2-rex-onig-dev' for regex 'g++-dev'
Note, selecting 'liblockdev0g-dev' for regex 'g++-dev'
Note, selecting 'nvidia-cg-dev' for regex 'g++-dev'
Note, selecting 'liburg-dev' for regex 'g++-dev'
Note, selecting 'golang-go-xdg-dev' for regex 'g++-dev'
Note, selecting 'libtotem-pg-dev' for regex 'g++-dev'
Note, selecting 'libjpeg-dev' for regex 'g++-dev'
Note, selecting 'xserver-xorg-dev-lts-raring' for regex 'g++-dev'
Note, selecting 'libpaperg-dev' for regex 'g++-dev'
Note, selecting 'libghc-dpkg-dev' for regex 'g++-dev'
Note, selecting 'libfirestring-dev' for regex 'g++-dev'
Note, selecting 'libaqbanking-dev' for regex 'g++-dev'
Note, selecting 'libplayerjpeg-dev' for regex 'g++-dev'
Note, selecting 'libopenjpeg-dev' for regex 'g++-dev'
Note, selecting 'libghc-web-routes-boomerang-dev' for regex 'g++-dev'
Note, selecting 'libboost-log-dev' for regex 'g++-dev'
Note, selecting 'libghc-blaze-svg-dev' for regex 'g++-dev'
Note, selecting 'liblua5.1-leg-dev' for regex 'g++-dev'
Note, selecting 'libmng-dev' for regex 'g++-dev'
Note, selecting 'libcap-ng-dev' for regex 'g++-dev'
Note, selecting 'libipmimonitoring-dev' for regex 'g++-dev'
Note, selecting 'libopencv-stitching-dev' for regex 'g++-dev'
Note, selecting 'lua-lpeg-dev' for regex 'g++-dev'
Note, selecting 'libghc-asn1-encoding-dev-0.8.1.1-10067' for regex 'g++-dev'
Note, selecting 'libxmltooling-dev' for regex 'g++-dev'
Note, selecting 'libghc-bytestring-dev' for regex 'g++-dev'
Note, selecting 'libcanna1g-dev' for regex 'g++-dev'
Note, selecting 'libncarg-dev' for regex 'g++-dev'
Note, selecting 'libwpg-dev' for regex 'g++-dev'
Note, selecting 'zlib1g-dev' for regex 'g++-dev'
Note, selecting 'lua5.2-lpeg-dev' for regex 'g++-dev'
Note, selecting 'libwebrtc-audio-processing-dev' for regex 'g++-dev'
Note, selecting 'libbiosig-dev' for regex 'g++-dev'
Note, selecting 'libroot-montecarlo-eg-dev' for regex 'g++-dev'
Note, selecting 'libdpkg-dev' for regex 'g++-dev'
Note, selecting 'libghc-utf8-string-dev' for regex 'g++-dev'
Note, selecting 'liboping-dev' for regex 'g++-dev'
Note, selecting 'libspctag-dev' for regex 'g++-dev'
Note, selecting 'libapt-pkg-dev' for regex 'g++-dev'
Note, selecting 'libgig-dev' for regex 'g++-dev'
Note, selecting 'liblangtag-dev' for regex 'g++-dev'
Note, selecting 'libghc-bytestring-lexing-dev-0.4.3-436a2' for regex 'g++-dev'
Note, selecting 'libchewing-dev' for regex 'g++-dev'
Note, selecting 'libeditorconfig-dev' for regex 'g++-dev'
Note, selecting 'libpolyclipping-dev' for regex 'g++-dev'
Note, selecting 'libghc-ekg-dev-0.3.1.3-b8023' for regex 'g++-dev'
Note, selecting 'libadplug-dev' for regex 'g++-dev'
Note, selecting 'cimg-dev' for regex 'g++-dev'
Note, selecting 'libghc-boomerang-dev' for regex 'g++-dev'
Note, selecting 'libghc-diagrams-svg-dev-0.8.0.2-883bb' for regex 'g++-dev'
Note, selecting 'libbg-dev' for regex 'g++-dev'
Note, selecting 'libonig-dev' for regex 'g++-dev'
Note, selecting 'science-engineering-dev' for regex 'g++-dev'
Note, selecting 'libvdeplug-dev' for regex 'g++-dev'
Note, selecting 'lua-rex-onig-dev' for regex 'g++-dev'
Note, selecting 'slang-dev6' for regex 'g++-dev'
Note, selecting 'xserver-xorg-dev' for regex 'g++-dev'
Note, selecting 'octave-pkg-dev' for regex 'g++-dev'
Note, selecting 'libghc-unix-bytestring-dev-0.3.5.4-503dc' for regex 'g++-dev'
Note, selecting 'lua5.1-leg-dev' for regex 'g++-dev'
Note, selecting 'libdogleg-dev' for regex 'g++-dev'
Note, selecting 'libghc-diagrams-svg-dev' for regex 'g++-dev'
Note, selecting 'libghc-base16-bytestring-dev' for regex 'g++-dev'
Note, selecting 'libghc-unix-bytestring-dev' for regex 'g++-dev'
Note, selecting 'libghc-base64-bytestring-dev-1.0.0.1-a619b' for regex 'g++-dev'
Note, selecting 'libgoogle-glog-dev' for regex 'g++-dev'
Note, selecting 'libjbig-dev' for regex 'g++-dev'
Note, selecting 'libghc-generic-deriving-dev-1.4.0-94eaa' for regex 'g++-dev'
Note, selecting 'libopenmeeg-dev' for regex 'g++-dev'
Note, selecting 'libshhmsg-dev' for regex 'g++-dev'
Note, selecting 'libsynfig-dev' for regex 'g++-dev'
Note, selecting 'xviewg-dev' for regex 'g++-dev'
Note, selecting 'libghc-base16-bytestring-dev-0.1.1.5-a277b' for regex 'g++-dev'
Note, selecting 'libagg-dev' for regex 'g++-dev'
Note, selecting 'xserver-xorg-dev-lts-trusty' for regex 'g++-dev'
Note, selecting 'libghc-generic-deriving-dev' for regex 'g++-dev'
Note, selecting 'xaw3dg-dev' for regex 'g++-dev'
Note, selecting 'libusbprog-dev' for regex 'g++-dev'
Note, selecting 'lua-leg-dev' for regex 'g++-dev'
Note, selecting 'libzerg-dev' for regex 'g++-dev'
Note, selecting 'libpng-dev' for regex 'g++-dev'
Note, selecting 'libpng12-dev' instead of 'libpng-dev'
Note, selecting 'dialog' instead of 'libdialog-dev'
Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev'
Note, selecting 'libpaper-dev' instead of 'libpaperg-dev'
Note, selecting 'audacious-dev' instead of 'libaudid3tag-dev'
Note, selecting 'ghc' instead of 'libghc-bytestring-dev'
Note, selecting 'ghc' instead of 'libghc-bytestring-dev-0.10.0.2-0b661'
Note, selecting 'libaqbanking34-dev' instead of 'libaqbanking-dev'
Note, selecting 'libbg1-dev' instead of 'libbg-dev'
Note, selecting 'libdshconfig1-dev' instead of 'libdshconfig-dev'
Note, selecting 'libghc-asn1-encoding-dev' instead of 'libghc-asn1-encoding-dev-0.8.1.1-10067'
Note, selecting 'libghc-base64-bytestring-dev' instead of 'libghc-base64-bytestring-dev-1.0.0.1-a619b'
Note, selecting 'libghc-base16-bytestring-dev' instead of 'libghc-base16-bytestring-dev-0.1.1.5-a277b'
Note, selecting 'libghc-blaze-svg-dev' instead of 'libghc-blaze-svg-dev-0.3.3.0-91cb1'
Note, selecting 'libghc-boomerang-dev' instead of 'libghc-boomerang-dev-1.4.0-3f832'
Note, selecting 'libghc-bytestring-lexing-dev' instead of 'libghc-bytestring-lexing-dev-0.4.3-436a2'
Note, selecting 'libghc-utf8-string-dev' instead of 'libghc-utf8-string-dev-0.3.7-b85cc'
Note, selecting 'libghc-diagrams-svg-dev' instead of 'libghc-diagrams-svg-dev-0.8.0.2-883bb'
Note, selecting 'libghc-dpkg-dev' instead of 'libghc-dpkg-dev-0.0.3-ba83c'
Note, selecting 'libghc-ekg-dev' instead of 'libghc-ekg-dev-0.3.1.3-b8023'
Note, selecting 'libghc-generic-deriving-dev' instead of 'libghc-generic-deriving-dev-1.4.0-94eaa'
Note, selecting 'libghc-hxt-relaxng-dev' instead of 'libghc-hxt-relaxng-dev-9.1.4-6441f'
Note, selecting 'libghc-pipes-bytestring-dev' instead of 'libghc-pipes-bytestring-dev-2.0.0-a203a'
Note, selecting 'libghc-unix-bytestring-dev' instead of 'libghc-unix-bytestring-dev-0.3.5.4-503dc'
Note, selecting 'libghc-web-routes-boomerang-dev' instead of 'libghc-web-routes-boomerang-dev-0.28.0-6f82d'
Note, selecting 'syslog-ng-core' instead of 'libsyslog-ng-dev'
Note, selecting 'libplayerjpeg3.0-dev' instead of 'libplayerjpeg-dev'
Note, selecting 'libshhmsg1-dev' instead of 'libshhmsg-dev'
Note, selecting 'liburg0-dev' instead of 'liburg-dev'
Note, selecting 'libzerg0-dev' instead of 'libzerg-dev'
Note, selecting 'lua-leg-dev' instead of 'liblua5.1-leg-dev'
Note, selecting 'lua-leg-dev' instead of 'lua5.1-leg-dev'
Note, selecting 'lua-lpeg-dev' instead of 'liblua5.1-lpeg-dev'
Note, selecting 'lua-lpeg-dev' instead of 'lua5.1-lpeg-dev'
Note, selecting 'lua-lpeg-dev' instead of 'lua5.2-lpeg-dev'
Note, selecting 'lua-rex-onig-dev' instead of 'lua5.1-rex-onig-dev'
Note, selecting 'lua-rex-onig-dev' instead of 'lua5.2-rex-onig-dev'
dialog is already the newest version.
zlib1g-dev is already the newest version.
zlib1g-dev set to manually installed.
dpkg-dev is already the newest version.
xserver-xorg-dev-lts-utopic is already the newest version.
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 to resolve the situation:
The following packages have unmet dependencies:
xserver-xorg-dev-lts-utopic : Conflicts: xserver-xorg-dev
E: Unable to correct problems, you have held broken packages.
myuser@myserver:~$`
答案1
没有这样的包。如输出所示,apt
然后尝试匹配正则表达式g++-dev
,即名称包含 的任何包g-dev
。对于g++
编译器,请使用g++
包;对于 C++ 标准库,请使用以下libstdc++-dev
包之一,例如libstdc++-4.8-dev
。