当我运行 apt-upgrade 时,我遇到了这个问题
The following packages have unmet dependencies:
libudev0 : Breaks: libudev0:i386 (!= 175-0ubuntu9.4) but 175-0ubuntu9.5 is installed
libudev0:i386 : Breaks: libudev0 (!= 175-0ubuntu9.5) but 175-0ubuntu9.4 is installe
我运行了我能想到的所有命令,例如clean
,,,等等。autoclean
install -f
dist-upgrade
我想我需要更多地了解这个问题的真正含义才能解决它。
我尝试过了remove libudev0 and libudev0:i386
但它也不起作用。
这到底是怎么回事?我遇到过类似的问题,Depends on
但从来没有Breaks
我尝试删除 libudev0:i386 但失败了:
buffalo@android-4c56l:/var/lib/dpkg$ sudo apt-get remove libudev0:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
gvfs:i386 : Depends: libudev0:i386 (>= 147) but it is not going to be installed
libgudev-1.0-0:i386 : Depends: libudev0:i386 (>= 165) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)
sudo apt-get install -f 给出:
buffalo@android-4c56l:/var/lib/dpkg$ sudo apt-get install -f
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:
language-pack-kde-en kde-l10n-engb openjdk-7-jre-lib language-pack-kde-en-base nvidia-settings-319-updates
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libudev0
The following packages will be upgraded:
libudev0
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/28.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: error processing libudev0 (--configure):
libudev0:amd64 175-0ubuntu9.4 cannot be configured because libudev0:i386 is in a different version (175-0ubuntu9.5)
dpkg: error processing libudev0:i386 (--configure):
libudev0:i386 175-0ubuntu9.5 cannot be configured because libudev0:amd64 is in a different version (175-0ubuntu9.4)
dpkg: dependency problems prevent configuration of libgudev-1.0-0:
libgudev-1.0-0 depends on libudev0 (>= 165); however:
Package libudev0 is not configured yet.
dpkg: error processing libgudev-1.0-0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgudev-1.0-0:i386:
libgudev-1.0-0:i386 depends on libudev0 (>= 165); however:
Package libudev0:i386 is not configured yet.
dpkg: error processing libgudev-1.0-0:i386 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of udev:
udev depends on libudev0 (>= 175); however:
Package libudev0 is not configured yet.
dpkg: error processing udev (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
libudev0
libudev0:i386
libgudev-1.0-0
libgudev-1.0-0:i386
udev
E: Sub-process /usr/bin/dpkg returned an error code (1)
buffalo@android-4c56l:/var/lib/dpkg$
尝试保留包裹然后自动删除:
buffalo@android-4c56l:/var/lib/dpkg$ sudo apt-mark hold libudev0
libudev0 set on hold.
buffalo@android-4c56l:/var/lib/dpkg$ sudo apt-mark hold libudev0:i386
libudev0:i386 set on hold.
buffalo@android-4c56l:/var/lib/dpkg$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libudev0 : Breaks: libudev0:i386 (!= 175-0ubuntu9.4) but 175-0ubuntu9.5 is installed
libudev0:i386 : Breaks: libudev0 (!= 175-0ubuntu9.5) but 175-0ubuntu9.4 is installed
E: Unmet dependencies. Try using -f.
答案1
阻止软件包升级libudev0
。libudev0:i386
sudo apt-mark hold libudev0
sudo apt-mark hold libudev0:i386
升级所有已安装的软件包
sudo apt-get upgrade
现在升级时不会出现错误。