解决方案

解决方案

我正在尝试在 Ubuntu 16.04(64 位)上安装 Skype,但遇到了困难。运行以下命令尝试安装后:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo dpkg -i skype-ubuntu-precise_4.3.0.37-1_i386.deb
sudo apt-get -f install

我收到如下所示的消息,建议删除 79 个包。我不知道为什么会发生这种情况,任何帮助都将不胜感激。

sudo apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  adium-theme-ubuntu apturl apturl-common gcc-6-base:i386
  gnome-software-common guile-2.0-libs libasound2:i386 libasyncns0:i386
  libavahi-common-data:i386 libavahi-common3:i386 libbsd0:i386 libc6:i386
  libcap2:i386 libcdparanoia0:i386 libcomerr2:i386 libedataserverui-1.2-1
  libedit2:i386 libelf1:i386 libffi6:i386 libflac8:i386 libfreetype6:i386
  libgc1c2 libgcc1:i386 libglapi-mesa:i386 libgmp10:i386 libgpg-error0:i386
  libgssapi-krb5-2:i386 libhogweed4:i386 libice6:i386 libjbig0:i386
  libjpeg-turbo8:i386 libjpeg8:i386 libjson-c2:i386 libk5crypto3:i386
  libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms2-2:i386
  liblzma5:i386 libmng2:i386 libnettle6:i386 libogg0:i386 libopus0:i386
  liborc-0.4-0:i386 liborcus-0.10-0v5 libp11-kit0:i386 libpciaccess0:i386
  libpcre3:i386 libpng12-0:i386 libpoppler-qt4-4 libqt5x11extras5
  libsamplerate0:i386 libselinux1:i386 libsndfile1:i386 libspeexdsp1:i386
  libsqlite3-0:i386 libssl1.0.0:i386 libtheora0:i386 libtiff5:i386
  libtinfo5:i386 libvisual-0.4-0:i386 libvorbis0a:i386 libvorbisenc2:i386
  libwrap0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386
  libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386
  libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386
  libxi6:i386 libxrender1:i386 libxshmfence1:i386 libxss1:i386 libxv1:i386
  libxxf86vm1:i386 mysql-common squashfs-tools ubuntu-wallpapers
  ubuntu-wallpapers-xenial zlib1g:i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  gcc-6-base:i386 libc6:i386 libgcc1:i386 libssl1.0.0:i386 libx11-6:i386
  libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386 libxss1:i386
  libxv1:i386
Suggested packages:
  glibc-doc:i386 locales:i386
The following packages will be REMOVED:
  aisleriot appstream bamfdaemon brltty compiz compiz-gnome deja-dup eog
  file-roller firefox flashplugin-installer fwupd gdb gimp git gnome-calendar
  gnome-software gstreamer1.0-alsa gstreamer1.0-fluendo-mp3 gstreamer1.0-libav
  gstreamer1.0-plugins-bad gstreamer1.0-plugins-bad-faad
  gstreamer1.0-plugins-bad-videoparsers gstreamer1.0-plugins-base-apps
  gstreamer1.0-plugins-ugly gstreamer1.0-plugins-ugly-amr gstreamer1.0-tools
  gtk2-engines-murrine gvfs-bin gvfs-fuse indicator-printers intel-gpu-tools
  kerneloops-daemon libappstream3 libbabeltrace-ctf1 libbabeltrace1
  libchromaprint0 libcompizconfig0 libdfu1 libfwupd1 libgimp2.0
  libgstreamer-plugins-bad1.0-0 libgtkspell3-3-0 libmagickcore-6.q16-2-extra
  libmetacity-private3a libreoffice-avmedia-backend-gstreamer libreoffice-calc
  libreoffice-gnome libreoffice-gtk libreoffice-ogltrans libreoffice-pdfimport
  light-themes nautilus-share notify-osd plymouth-label
  plymouth-theme-ubuntu-logo printer-driver-brlaser python-gtk2 r-cran-xml
  simple-scan skype:i386 snapd system-config-printer-udev texstudio-qt4
  thermald touchegg ubuntu-artwork ubuntu-core-launcher ubuntu-desktop
  ubuntu-release-upgrader-gtk ubuntu-software unity unity-lens-applications
  update-manager update-notifier virtualbox-5.1 whoopsie
  xserver-xorg-video-intel xserver-xorg-video-qxl
The following NEW packages will be installed:
  gcc-6-base:i386 libc6:i386 libgcc1:i386 libssl1.0.0:i386 libx11-6:i386
  libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386 libxss1:i386
  libxv1:i386
0 upgraded, 11 newly installed, 79 to remove and 0 not upgraded.
1 not fully installed or removed.

编辑:我不知道这是否有帮助,但如果我在此之后删除 skype:i386,然后运行 ​​apt-get -f install,则不会出现任何错误:

sudo apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

编辑:一些有助于解决问题的故障排除(感谢@user.dz!)

尝试 1

sudo dpkg --add-architecture amd64
sudo apt-get update
sudo apt-get autoremove
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo dpkg -i skype-ubuntu-precise_4.3.0.37-1_i386.deb

仍然出现错误: dpkg: dependency problems prevent configuration of skype:i386,以及库列表。此外,它在 Ubuntu 上创建了“错误:BrokenCount>0”

第二次尝试

apt-cache policy libqt4-dbus:i386

仍然有错误:http://pastebin.com/ijCAJAXf

尝试 3:gdebi

安装了 gdebi,尝试过:sudo gdebi --o Debug::pkgProblemResolver=yes skype-ubuntu-precise_4.3.0.37-1_i386.deb

但依赖性问题依然存在:http://pastebin.com/pP2k1xxF

第四次尝试

因此在检查之后

apt-cache policy libqt4-dbus:i386

结果如下:http://pastebin.com/ijCAJAXf,尝试安装缺少的依赖项

sudo apt-get install libqt4-dbus:i386

但仍然收到未满足的依赖关系错误:

libqt4-dbus:i386 : Depends: libqtdbus4:i386 (= 4:4.8.7+dfsg-5ubuntu2) but it is not going to be installed 
E: Unable to correct problems, you have held broken packages.

尝试 5:能力和额外故障排除

安装 aptitude,并尝试使用它安装缺少的依赖项(aptitude 更擅长处理依赖项)

sudo apt-get install aptitude
echo q | aptitude -s install libqtdbus4:i386

还是没能安装成功,http://pastebin.com/CNfN0dEp

输出

apt-get -s -o Debug::pkgProblemResolver=yes install libqtdbus4:i386

是这里的一个:http://pastebin.com/8yJSXtue

还有 rdepends 的输出

sudo apt-get install apt-rdepends
apt-cache policy $(apt-rdepends libqt4-dbus:i386 2>/dev/null | grep "^[a-zA-Z]" | sort | paste -s -d" ")

http://pastebin.com/jFDVerhr

答案1

在得到@user.dz 的一些(实际上是很多)帮助后,我找到了问题所在。

问题出在这里:

The following packages have unmet dependencies: 
libdbus-1-3 : Breaks: libdbus-1-3:i386 (!= 1.10.6-1ubuntu3.1) but 1.10.6-1ubuntu3 is to be installed. 
libdbus-1-3:i386 : Breaks: libdbus-1-3 (!= 1.10.6-1ubuntu3) but 1.10.6-1ubuntu3.1 is installed. 
libsystemd0 : Breaks: libsystemd0:i386 (!= 229-4ubuntu10) but 229-4ubuntu4 is to be installed. 
libsystemd0:i386 : Breaks: libsystemd0 (!= 229-4ubuntu4) but 229-4ubuntu10 is installed. 
gcc-5-base : Breaks: gcc-5-base:i386 (!= 5.4.0-6ubuntu1~16.04.2) but 5.3.1-14ubuntu2 is to be installed. 
gcc-5-base:i386 : Breaks: gcc-5-base (!= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.2 is installed. 
libgcrypt20 : Breaks: libgcrypt20:i386 (!= 1.6.5-2ubuntu0.2) but 1.6.5-2 is to be installed. 
libgcrypt20:i386 : Breaks: libgcrypt20 (!= 1.6.5-2) but 1.6.5-2ubuntu0.2 is installed. 
libstdc++6 : Breaks: libstdc++6:i386 (!= 5.4.0-6ubuntu1~16.04.2) but 5.3.1-14ubuntu2 is to be installed. 
libstdc++6:i386 : Breaks: libstdc++6 (!= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.2 is installed. 
libglib2.0-0 : Breaks: libglib2.0-0:i386 (!= 2.48.1-1~ubuntu16.04.1) but 2.48.0-1ubuntu4 is to be installed. 
libglib2.0-0:i386 : Breaks: libglib2.0-0 (!= 2.48.0-1ubuntu4) but 2.48.1-1~ubuntu16.04.1 is installed.

请注意每个软件包(libdbus-1-3 (amd64) 除外)都与其 libdbus-1-3:i386(i386 组件)发生冲突,因为它们应该是相同的版本。这并apt-get不能解决一些需要降级软件包的情况,但是aptitude确实提供了这种高级解决方案。

sudo apt-get dist-upgrade

没有产生任何输出(0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded),并且我也无法手动安装缺少的依赖项,如sudo apt-get install libdbus-1-3=1.10.6-1ubuntu3.1 libdbus-1-3:i386=1.10.6-1ubuntu3.1返回的那样E: Version '1.10.6-1ubuntu3.1' for 'libdbus-1-3:i386' was not found

然后apt-cache policy libdbus-1-3:i386回来了

libdbus-1-3:i386: 
Installed: (none) 
Candidate: 1.10.6-1ubuntu3 
Version table: 
1.10.6-1ubuntu3 500 
500 archive.ubuntu.com/ubuntu xenial/main i386 Packages

让我们知道更新和安全存储库未启用。解决方案是启用它们并使用 aptitude 安装缺少的依赖项。

解决方案

1. 启用安全和更新存储库

在系统设置>软件和更新>更新中,启用以下两项: 启用安全和更新存储库

2. 更新和 dist-upgrade

sudo apt-get update
sudo apt-get dist-upgrade

3.安装缺少的依赖项

sudo aptitude -s install libqtdbus4:i386 

4. 安装 Skype!

sudo aptitude install skype

我希望这可以帮助到别人,再次感谢@user.dz :)

相关内容