EDIT 3 :
Это после команды sudo apt-get cleange libpciaccess*
laur@laur-System-Product-Name:~$ sudo apt-get purge
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpciaccess0 : Breaks: libpciaccess0:i386 (!= 0.14-1) but 0.16-
0ubuntu1 is installed
libpciaccess0:i386 : Breaks: libpciaccess0 (!= 0.16-0ubuntu1) but
0.14-1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages
(or specify a solution).
laur@laur-System-Product-Name:~$ sudo apt-get purge libpciaccess*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libpciaccess0' for glob 'libpciaccess*'
Note, selecting 'libpciaccess-dev' for glob 'libpciaccess*'
Package 'libpciaccess-dev' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
intel-media-va-driver : Depends: libpciaccess0 but it is not going to
be installed
libdrm-intel1 : Depends: libpciaccess0 but it is not going to be
installed
spice-vdagent : Depends: libpciaccess0 but it is not going to be
installed
ubuntu-drivers-common : Depends: libpciaccess0 (>= 0.10.7) but it is
not going to be installed
xserver-xorg-core : Depends: libpciaccess0 (>= 0.12.902) but it is not
going to be installed
xserver-xorg-video-ati : Depends: libpciaccess0 but it is not going to
be installed
xserver-xorg-video-intel : Depends: libpciaccess0 (>=
0.8.0+git20071002) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages
(or specify a solution).
Больше их появляется .... Я также пытался установить Intel Graphics For Linux, но, к сожалению, его установка не сработала.
EDIT 2 :
laur@laur-System-Product-Name:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libpciaccess0
The following packages will be upgraded:
libpciaccess0
1 upgraded, 0 newly installed, 0 to remove and 94 not upgraded.
13 not fully installed or removed.
Need to get 0 B/17,9 kB of archives.
After this operation, 33,8 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 232583 files and directories currently
installed.)
Preparing to unpack .../libpciaccess0_0.16-0ubuntu1_amd64.deb ...
Unpacking libpciaccess0:amd64 (0.16-0ubuntu1) over (0.14-1) ...
dpkg: error processing archive
/var/cache/apt/archives/libpciaccess0_0.16-0ubuntu1_amd64.deb (--
unpack):
trying to overwrite shared
'/usr/share/doc/libpciaccess0/changelog.Debian.gz', which is different
from other instances of package libpciaccess0:amd64
Errors were encountered while processing:
/var/cache/apt/archives/libpciaccess0_0.16-0ubuntu1_amd64.deb
**E: Sub-process /usr/bin/dpkg returned an error code (1)**
Я получаю ошибку выше ^
EDIT :
Я восстановил репозитории по умолчанию с помощью метода, предоставленного @karel, и все равно получаю тот же самый вывод:
laur@laur-System-Product-Name:~$ sudo apt-get upgrade
[sudo] password for laur:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpciaccess-dev : Depends: libpciaccess0 (= 0.16-0ubuntu1) but 0.14-1
is installed
libpciaccess0 : Breaks: libpciaccess0:i386 (!= 0.14-1) but 0.16-
0ubuntu1 is installed
libpciaccess0:i386 : Breaks: libpciaccess0 (!= 0.16-0ubuntu1) but
0.14-1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages
(or specify a solution).
Добрый день! Я столкнулся с действительно раздражающей проблемой с Ubuntu 20.04, у меня есть те пакеты, которые имеют неудовлетворенные зависимости, я пытался использовать все методы, найденные мной в Интернете, чтобы удалить их, но ни один из них не работал, как ожидалось.
Я хочу просто исправить эту ошибку, чтобы установить некоторые необходимые обновления для Linux
Я пытался sudo apt --fix-broken install
, но это не сработало.
Я новичок в дистрибутиве Linux и хочу просто научиться пользоваться им лучше.
Спасибо за любую помощь!
laur@laur-System-Product-Name:~$ sudo apt update
[sudo] password for laur:
Hit:1 http://ro.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 https://repo.steampowered.com/steam stable InRelease
Hit:3 http://ro.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 https://deb.nodesource.com/node_14.x focal InRelease
Hit:5 https://brave-browser-apt-release.s3.brave.com stable InRelease
Hit:6 http://ro.archive.ubuntu.com/ubuntu focal-backports InRelease
Get:7 http://security.ubuntu.com/ubuntu focal-security InRelease [107
kB]
Hit:8 https://packages.microsoft.com/repos/ms-teams stable InRelease
Fetched 107 kB in 1s (112 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
7 packages can be upgraded. Run 'apt list --upgradable' to see them.
laur@laur-System-Product-Name:~$ sudo apt list --upgradable
Listing... Done
aptdaemon-data/focal-updates,focal-updates,focal-security,focal-
security 1.1.1+bzr982-0ubuntu32.2 all [upgradable from: 1.1.1+bzr982-
0ubuntu32]
aptdaemon/focal-updates,focal-updates,focal-security,focal-security
1.1.1+bzr982-0ubuntu32.2 all [upgradable from: 1.1.1+bzr982-0ubuntu32]
gdebi-core/focal,focal 0.9.5.7+nmu3 all [upgradable from:
0.9.5.7+nmu3]
libpciaccess0/focal 0.16-0ubuntu1 amd64 [upgradable from: 0.14-1]
python3-aptdaemon.gtk3widgets/focal-updates,focal-updates,focal-
security,focal-security 1.1.1+bzr982-0ubuntu32.2 all [upgradable from:
1.1.1+bzr982-0ubuntu32]
python3-aptdaemon/focal-updates,focal-updates,focal-security,focal-
security 1.1.1+bzr982-0ubuntu32.2 all [upgradable from: 1.1.1+bzr982-
0ubuntu32]
secureboot-db/focal-updates 1.6~20.04.1 amd64 [upgradable from: 1.5]
laur@laur-System-Product-Name:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpciaccess-dev : Depends: libpciaccess0 (= 0.16-0ubuntu1) but 0.14-1
is installed
libpciaccess0 : Breaks: libpciaccess0:i386 (!= 0.14-1) but 0.16-
0ubuntu1 is installed
libpciaccess0:i386 : Breaks: libpciaccess0 (!= 0.16-0ubuntu1) but
0.14-1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages
(or specify a solution).
Перейдите в / usr / share / doc /
.
Удалите два каталога libpciaccess0
и libpciaccess-dev
каталоги
И выполните sudo apt install --fix-broken
, и проблема будет устранена.
После некоторых поисков различных решений я пришел к одному, которое мне помогло.
Я восстановил файл sources.list, используя решение, представленное в этом ответе
Я восстановил файл файл состояния с использованием этих команд, найденных здесь :
mv / var / lib / dpkg / status /var/lib/dpkg/status.old[1232 sizes -l /var/backups/dpkg.status *
cp /var/backups/dpkg.status.0 / var / lib / dpkg / status
sudo dpkg --remove-architecture i386
sudo apt-get update
и
sudo apt-get upgrade
До того, как я удалил пакет, который был в моей ошибке (пакет libpciaccess ), используя sudo dpkg -r libpciaccess * или sudo apt-get purge libpciaccess *, но я думаю, что восстановления файла состояния было достаточно, потому что, когда я обновил и обновил Ubuntu, после этого были установлены все необходимые обновления, и моя ошибка при обновлении программного обеспечения исчезла.
Я думаю, этот ответ поможет другим, у которых есть такая же проблема, как у меня. Спасибо за вашу потрясающую помощь!
Сначала попробуйте ,
sudo dpkg --configure -a
Если это не сработало, используйте aptitude
вместо apt-get
sudo aptitude install package_name_here
. Он предложит решения для зависимостей. Попробовать их. Если ничего не помогает, вам нужно вручную отредактировать файл состояния dpkg
sudo gedit /var/lib/dpkg/status
. Затем найдите проблемное имя пакета. Удалите эти пакеты и сохраните файл. Затем обновите и обновите.
sudo apt-get update && upgrade
Затем он установит необходимые пакеты во время обновления. Дайте мне знать, если это не сработает.