Debian:已安装软件包的版本号与存储库中的版本号不同,导致依赖性问题

Debian:已安装软件包的版本号与存储库中的版本号不同,导致依赖性问题

我无法安装 libav-dbg,因为已安装软件包的版本号与存储库中的版本号不对应,存在依赖性问题。这是怎么回事?我该如何解决这个问题?

问题描述:

尝试安装 libav-dbg 会产生以下依赖问题:

Reading package lists...
Building dependency tree...
Reading state information...
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:
 libav-dbg : Depends: libavcodec55 (= 6:10.2-1) but 10:2.1.3-dmo2 is to be installed or
                      libavcodec-extra-55 (= 6:10.2-1) but it is not going to be installed
             Depends: libavformat55 (= 6:10.2-1) but 10:2.1.3-dmo2 is to be installed
             Depends: libswscale2 (= 6:10.2-1) but 10:2.1.3-dmo2 is to be installed

运行apt-cache policy libavcodec55显示安装的版本与存储库中的版本不同。

libavcodec55:
  Installed: 10:2.1.3-dmo2
  Candidate: 10:2.1.3-dmo2
  Version table:
 *** 10:2.1.3-dmo2 0
        100 /var/lib/dpkg/status
     6:10.2-2 0
          600 http://debian.ethz.ch/debian/ unstable/main amd64 Packages
     6:10.2-1 0
          650 http://debian.ethz.ch/debian/ testing/main amd64 Packages

在线 debian 软件包文档中我没有找到对版本“10:2.1.3-dmo2”的任何引用。

有关我的系统的信息:

我正在使用 apt-pinning 运行 Debian 测试到不稳定版本,但我只将不稳定版本用于不相关的软件包 (python3-matplotlib)。我继续使用 repo 来安装程序。

尝试解决问题的措施:

apt-get -t testing install libavcodec55

Reading package lists...
Building dependency tree...
Reading state information...
libavcodec55 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

apt-get --reinstall install libavcodec55

Reading package lists...
Building dependency tree...
Reading state information...
Reinstallation of libavcodec55 is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

尝试删除软件包 libavcodec55 以便稍后重新安装也会删除大量其他软件包(一定是由于依赖关系?)。因此,除非有办法阻止删除所有其他软件包,否则这是不切实际的。

apt-get remove libavcodec55

Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  audacity-data automoc digikam-data dvdauthor dvgrab enblend enfuse freeglut3
  genisoimage htdig hugin hugin-data hugin-tools kde-base-artwork
  kde-wallpapers-default kde-workspace-data kde-workspace-kgreet-plugins
  kdenlive-data kipi-plugins-common liba52-0.7.4-dev libastro-dev libastro1
  libboost-filesystem1.54.0 libboost-filesystem1.55.0 libboost-system1.54.0
  libcln6 libdc1394-22-dev libdirac-dev libfaac-dev libfaad-dev libfftw3-3
  libfftw3-double3 libfftw3-long3 libflac++6 libglew1.10 libgsm1-dev libhdf5-7
  libkdcraw-data libkephal4abi1 libkipi-data libksane-data libksane0
  libkscreensaver5 libksignalplotter4 libmlt-data libmp3lame-dev
  libopencore-amrnb-dev libopencore-amrwb-dev libopencv-core-dev
  libopencv-flann-dev libopencv-gpu-dev libopencv-imgproc-dev libopencv-ml-dev
  libopencv-photo-dev libopencv-video-dev liborc-0.4-dev libpano13-3
  libpano13-bin libphonon-dev libportsmf0 libprocessui4a libpyside1.2
  libqalculate5 libqalculate5-data libqextserialport1 libqgpgme1
  libqtlocation1 libquazip0 libquicktime2 libraw1394-dev libsbsms10
  libschroedinger-dev libshiboken1.2 libshp2 libsoprano-dev libsoundtouch0
  libsox-fmt-alsa libsox-fmt-base libsox2 libsoxr0 libswscale-dev
  libtheora-dev libvamp-hostsdk3 libvigraimpex4 libwxbase3.0-0 libwxgtk3.0-0
  libx264-dev libxvidcore-dev libzthread-2.3-2 marble-data oxygencursors
  python-pyside.qtcore python-pyside.qtdeclarative python-pyside.qtgui
  python-pyside.qthelp python-pyside.qtnetwork python-pyside.qtopengl
  python-pyside.qtscript python-pyside.qtsql python-pyside.qtsvg
  python-pyside.qttest python-pyside.qtuitools python-pyside.qtwebkit
  python-pyside.qtxml recordmydesktop swh-plugins
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libavcodec-extra-55 phonon-backend-null
The following packages will be REMOVED:
  audacity digikam digikam-private-libs ffmpegthumbs freespacenotifier
  frei0r-plugins gimp gstreamer1.0-libav katepart kde-runtime kde-style-oxygen
  kde-window-manager kde-workspace kde-workspace-bin kdebase-workspace
  kdelibs-bin kdelibs5-dev kdelibs5-plugins kdenlive kdepim-runtime
  kdepimlibs-kio-plugins kdepimlibs5-dev kdoctools khelpcenter4 kipi-plugins
  klipper kscreen ksysguard libakonadi-calendar4 libakonadi-contact4
  libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libakonadi-socialutils4
  libakonadi-xml4 libav-tools libavcodec-dev libavcodec55 libavdevice54
  libavfilter4 libavformat-dev libavformat55 libchromaprint-tools libcv-dev
  libcvaux-dev libgegl-0.2-0 libhighgui-dev libkabc4 libkactivities-bin
  libkactivities-models1 libkalarmcal2 libkatepartinterfaces4 libkblog4
  libkcal4 libkcalutils4 libkdcraw-dev libkdcraw23 libkde3support4
  libkdewebkit5 libkemoticons4 libkexiv2-dev libkfile4 libkgapi2-2 libkhtml5
  libkimproxy4 libkio5 libkipi-dev libkipi11 libkmediaplayer4 libknewstuff2-4
  libknewstuff3-4 libknotifyconfig4 libkolab0 libkontactinterface4 libkparts4
  libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4
  libkrossui4 libksane-dev libktexteditor4 libktnef4 libkutils4
  libkworkspace4abi2 libkxmlrpcclient4 libmailtransport4 libmarble-dev
  libmarblewidget18 libmicroblog4 libmlt++3 libmlt6 libokularcore4
  libopencv-calib3d-dev libopencv-calib3d2.4 libopencv-contrib-dev
  libopencv-contrib2.4 libopencv-dev libopencv-features2d-dev
  libopencv-features2d2.4 libopencv-gpu2.4 libopencv-highgui-dev
  libopencv-highgui2.4 libopencv-legacy-dev libopencv-legacy2.4
  libopencv-objdetect-dev libopencv-objdetect2.4 libopencv-ocl-dev
  libopencv-ocl2.4 libopencv-stitching-dev libopencv-stitching2.4
  libopencv-superres-dev libopencv-superres2.4 libopencv-ts-dev
  libopencv-ts2.4 libopencv-videostab-dev libopencv-videostab2.4
  libopencv2.4-java libopencv2.4-jni libplasma3 libplasmaclock4abi4
  libplasmagenericshell4 libstreamanalyzer0 libsyndication4
  libtaskmanager4abi4 libweather-ion6 marble-plugins melt minidlna mplayer2
  okular phonon phonon-backend-vlc plasma-dataengines-workspace plasma-desktop
  plasma-scriptengine-javascript plasma-widgets-workspace python-pyside
  python-pyside.phonon systemsettings vlc vlc-dbg vlc-nox vlc-plugin-notify
  vlc-plugin-pulse
The following NEW packages will be installed:
  libavcodec-extra-55 phonon-backend-null
0 upgraded, 2 newly installed, 145 to remove and 0 not upgraded.
Need to get 2'855 kB of archives.
After this operation, 310 MB disk space will be freed.
Do you want to continue? [Y/n] Abort.

答案1

*** 10:2.1.3-dmo2 0

100 /var/lib/dpkg/状态

看起来您是使用 libavcodec55 安装的,dpkg -i libavcodec55*.deb而不是从 apt 存储库安装的。

从版本号中的“-dmo2”来看,我认为这是一个来自http://www.deb-multimedia.org

您可以尝试卸载 libavcodec55、libavcodec-extra-55、libavformat55 和 libswscale2:

apt-get remove libavcodec55 libavcodec-extra-55 libavformat55 libswscale2

然后从存储库中安装它们:

apt-get install libavcodec55 libavcodec-extra-55 libavformat55 libswscale2

如果您不想删除依赖于这些软件包,您可以使用:

dpkg -r --force-depends libavcodec55 libavcodec-extra-55 libavformat55 libswscale2

您的系统将处于不一致状态,但您可以使用 修复该问题apt-get -f install,它会安装缺少的依赖项,即您刚刚删除的软件包,但来自存储库。

(顺便说一下,deb-multimedia 中的 libav* 软件包来自 ffmpeg 本身,而 Debian 中的那些软件包来自叉。

您可能有充分的理由想要使用 deb-multimedia 中的软件包而不是 Debian 中的软件包,但在这种情况下,您应该使用 deb-multimedia 的存储库而不是手动安装 DEB。)

相关内容