Вопрос или проблема
после команд
sudo apt-get update
sudo apt-get upgrade
я пытаюсь обновить драйвер nvidia с помощью команд, но получаю ошибку:
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001341sv00001462sd00001112bc03sc02i00
vendor : NVIDIA Corporation
model : GM108M [GeForce 840M]
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-510 - distro non-free recommended
driver : nvidia-driver-510-server - distro non-free
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-390 - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# ubuntu-drivers autoinstall
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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:
dpkg-dev : Depends: libdpkg-perl (= 1.21.1ubuntu2) but 1.21.1ubuntu2.3 is to be installed
Recommends: build-essential but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Пытаюсь исправить проблему следующим образом:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# sudo aptitude -f install libdpkg-perl
libdpkg-perl is already installed at the requested version (1.21.1ubuntu2.3)
libdpkg-perl is already installed at the requested version (1.21.1ubuntu2.3)
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# sudo aptitude -f install build-essential
The following NEW packages will be installed:
build-essential{b}
0 packages upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 4 744 B of archives. After unpacking 21,5 kB will be used.
The following packages have unmet dependencies:
build-essential : Depends: gcc (>= 4:10.2) but it is not installable
Depends: g++ (>= 4:10.2) but it is not installable
Depends: dpkg-dev (>= 1.17.11) but it is not installable
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) build-essential [Not Installed]
Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Но это не помогло, и я все еще получаю ошибку:
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# ubuntu-drivers autoinstall
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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:
dpkg-dev : Depends: libdpkg-perl (= 1.21.1ubuntu2) but 1.21.1ubuntu2.3 is to be installed
Recommends: build-essential but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Я использовал подсказки из ветки Unable to correct problems, you have held broken packages
и затем открыл synaptic и несколько раз выбрал меню Edit -> Fix Broken Packages, но
ничего не изменилось, и кнопка “Apply” все еще отключена.
В моей ОС :
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# uname -a
Linux master-at-home 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# sudo lshw -numeric -C display
*-display
description: 3D controller
product: GM108M [GeForce 840M] [10DE:1341]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a2
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom
configuration: driver=nouveau latency=0
resources: irq:38 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff
*-display
description: VGA compatible controller
product: 4th Gen Core Processor Integrated Graphics Controller [8086:416]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
logical name: /dev/fb0
version: 06
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom fb
configuration: depth=32 driver=i915 latency=0 resolution=1920,1080
resources: irq:39 memory:f7400000-f77fffff memory:d0000000-dfffffff ioport:f000(size=64) memory:c0000-dffff
Я не могу выбрать подходящий видеодрайвер в менеджере драйверов из-за этой ошибки…
Какой шаг мне нужно предпринять, чтобы исправить эту ошибку?
ОБНОВЛЕНО # 1:
Я запускаю команды обновления без ошибок:
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# sudo apt update
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://deb.nodesource.com/node_18.x nodistro InRelease
Hit:3 http://ua.archive.ubuntu.com/ubuntu jammy InRelease
Hit:4 https://download.docker.com/linux/ubuntu jammy InRelease
Hit:5 https://deb.opera.com/opera-stable stable InRelease
Hit:6 https://ppa.launchpadcontent.net/giuspen/ppa/ubuntu jammy InRelease
Hit:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
vlc-plugin-qt libvlc5 redis-server vlc-data python3-tornado libvlccore9
libzbar0 libheif1 vlc imagemagick libavcodec-extra vlc-bin libjs-jquery-ui
libpathplan4 vlc-l10n graphviz libavdevice58 libgvpr2 libgvc6 ffmpeg
libopenexr25 libpostproc55 libcgraph6 libmagickcore-6.q16-6-extra
vlc-plugin-samba libcdt5 php-twig libmagickwand-6.q16-6 libavcodec-extra58
vlc-plugin-notify libavutil56 imagemagick-6.q16 libswscale5 redis-tools
libeditorconfig0 libmagickcore-6.q16-6 vlc-plugin-access-extra
vlc-plugin-skins2 vlc-plugin-video-splitter liblab-gamut1 libswresample3
imagemagick-6-common vlc-plugin-video-output libavformat58 libde265-0
libvlc-bin vlc-plugin-base vlc-plugin-visualization libavfilter7
Learn more about Ubuntu Pro at https://ubuntu.com/pro
#
# Патчи доступны для локальной уязвимости повышения привилегий в needrestart
# отслеживается CVE-2024-48990, CVE-2024-48991, CVE-2024-48992 и CVE-2024-10224
# Подробнее см.: https://ubuntu.com/blog/needrestart-local-privilege-escalation
#
The following NEW packages will be installed:
debsuryorg-archive-keyring
The following packages will be upgraded:
php-common php8.4-cli php8.4-common php8.4-opcache php8.4-phpdbg php8.4-readline
6 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 5 314 kB of archives.
After this operation, 37,9 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 debsuryorg-archive-keyring all 2024.02.05+ubuntu22.04.1+deb.sury.org+1 [4 328 B]
Get:2 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 php-common all 2:95+ubuntu22.04.1+deb.sury.org+1 [16,9 kB]
Get:3 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 php8.4-readline amd64 8.4.2-1+ubuntu22.04.1+deb.sury.org+1 [13,7 kB]
Get:4 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 php8.4-opcache amd64 8.4.2-1+ubuntu22.04.1+deb.sury.org+1 [467 kB]
Get:5 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 php8.4-phpdbg amd64 8.4.2-1+ubuntu22.04.1+deb.sury.org+1 [2 017 kB]
Get:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 php8.4-cli amd64 8.4.2-1+ubuntu22.04.1+deb.sury.org+1 [1 995 kB]
Get:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 php8.4-common amd64 8.4.2-1+ubuntu22.04.1+deb.sury.org+1 [801 kB]
Fetched 5 314 kB in 5s (1 056 kB/s)
Selecting previously unselected package debsuryorg-archive-keyring.
(Reading database ... 274447 files and directories currently installed.)
Preparing to unpack .../0-debsuryorg-archive-keyring_2024.02.05+ubuntu22.04.1+deb.sury.org+1_all.deb ...
Unpacking debsuryorg-archive-keyring (2024.02.05+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../1-php-common_2%3a95+ubuntu22.04.1+deb.sury.org+1_all.deb ...
Unpacking php-common (2:95+ubuntu22.04.1+deb.sury.org+1) over (2:92ubuntu1) ...
Preparing to unpack .../2-php8.4-readline_8.4.2-1+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php8.4-readline (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) over (8.4.1-3+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../3-php8.4-opcache_8.4.2-1+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php8.4-opcache (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) over (8.4.1-3+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../4-php8.4-phpdbg_8.4.2-1+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php8.4-phpdbg (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) over (8.4.1-3+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../5-php8.4-cli_8.4.2-1+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php8.4-cli (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) over (8.4.1-3+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../6-php8.4-common_8.4.2-1+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php8.4-common (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) over (8.4.1-3+ubuntu22.04.1+deb.sury.org+1) ...
Setting up debsuryorg-archive-keyring (2024.02.05+ubuntu22.04.1+deb.sury.org+1) ...
Setting up php-common (2:95+ubuntu22.04.1+deb.sury.org+1) ...
Setting up php8.4-common (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) ...
Setting up php8.4-opcache (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) ...
Setting up php8.4-readline (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) ...
Setting up php8.4-cli (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) ...
Setting up php8.4-phpdbg (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for php8.4-cli (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) ...
Processing triggers for php8.4-phpdbg (8.4.2-1+ubuntu22.04.1+deb.sury.org+1) ...
Но проверка autoinstall все еще выдает ошибки:
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# ubuntu-drivers autoinstall
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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:
dpkg-dev : Depends: libdpkg-perl (= 1.21.1ubuntu2) but 1.21.1ubuntu2.3 is to be installed
Recommends: build-essential but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Попробовал команду full-upgrade:
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
vlc-plugin-qt libvlc5 redis-server vlc-data python3-tornado libvlccore9
libzbar0 libheif1 vlc imagemagick libavcodec-extra vlc-bin libjs-jquery-ui
libpathplan4 vlc-l10n graphviz libavdevice58 libgvpr2 libgvc6 ffmpeg
libopenexr25 libpostproc55 libcgraph6 libmagickcore-6.q16-6-extra
vlc-plugin-samba libcdt5 php-twig libmagickwand-6.q16-6 libavcodec-extra58
vlc-plugin-notify libavutil56 imagemagick-6.q16 libswscale5 redis-tools
libeditorconfig0 libmagickcore-6.q16-6 vlc-plugin-access-extra
vlc-plugin-skins2 vlc-plugin-video-splitter liblab-gamut1 libswresample3
imagemagick-6-common vlc-plugin-video-output libavformat58 libde265-0
libvlc-bin vlc-plugin-base vlc-plugin-visualization libavfilter7
Learn more about Ubuntu Pro at https://ubuntu.com/pro
#
# Патчи доступны для локальной уязвимости повышения привилегий в needrestart
# отслеживается CVE-2024-48990, CVE-2024-48991, CVE-2024-48992 и CVE-2024-10224
# Подробнее см.: https://ubuntu.com/blog/needrestart-local-privilege-escalation
#
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Все еще та же ошибка:
root@master-at-home:/opt/PhpStorm-242.24807.17/bin# ubuntu-drivers autoinstall
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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:
dpkg-dev : Depends: libdpkg-perl (= 1.21.1ubuntu2) but 1.21.1ubuntu2.3 is to be installed
Recommends: build-essential but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ОБНОВЛЕНО # 2:
Проверил содержимое файлов:
sudo nano /etc/apt/sources.list :
# deb cdrom:[Kubuntu 22.04.3 LTS _Jammy Jellyfish_ - Release amd64 (20230807.1)]/ jammy main multiverse restricted universe
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ua.archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ua.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ua.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://ua.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
# deb-src http://security.ubuntu.com/ubuntu jammy-security universe
# deb-src http://security.ubuntu.com/ubuntu jammy-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
и
root@master-at-home:/etc/apt/sources.list.d# ls -la
total 48
drwxr-xr-x 2 root root 4096 січ 9 13:57 .
drwxr-xr-x 8 root root 4096 січ 10 15:07 ..
-rw-r--r-- 1 root root 110 гру 23 17:35 docker.list
-rw-r--r-- 1 root root 142 гру 8 14:32 giuspen-ubuntu-ppa-jammy.list
-rw-r--r-- 1 root root 142 гру 8 14:32 giuspen-ubuntu-ppa-jammy.list.save
-rw-r--r-- 1 root root 190 гру 8 14:32 google-chrome.list
-rw-r--r-- 1 root root 190 гру 8 14:32 google-chrome.list.save
-rw-r--r-- 1 root root 113 гру 8 14:32 nodesource.list
-rw-r--r-- 1 root root 113 гру 8 14:32 nodesource.list.save
-rw-r--r-- 1 root root 140 гру 8 14:32 ondrej-ubuntu-php-jammy.list
-rw-r--r-- 1 root root 140 гру 8 14:32 ondrej-ubuntu-php-jammy.list.save
-rw-r--r-- 1 root root 187 січ 9 13:57 opera-stable.list
В моем KDE я имею discover и Synaptic, и нашел в нем:
Не уверен, какую GUI Software & Updates вы имеете в виду? Это какая-то специальная программа, которую мне нужно установить?
У вас, похоже, конфликт зависимостей, убедитесь, что у вас есть main
, universe
, restricted
, multiverse
, jammy-updates
и jammy-security
в /etc/apt/sources.list
/etc/apt/sources.list.d/
, как например
deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
и в GUI Software & Updates
проверьте, что main
, restricted
, universe
и multiverse
включены
обновление:
ваш /etc/apt/sources.list
должен выглядеть так:
deb http://ua.archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb http://ua.archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb http://ua.archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
поэтому вам нужно добавить или раскомментировать (убрать # в начале) некоторые из этих строк
затем мы сохраняем и выполняем следующие команды:
sudo apt update
sudo apt dist-upgrade
И теперь вы должны иметь возможность выполнить ubuntu-drivers autoinstall
затем вы можете установить драйвер NVIDIA без несоответствия
.
Ответ или решение
Опираясь на ваш подробный вопрос о невозможности обновления драйвера NVIDIA из-за ошибки с удерживаемыми сломанными пакетами, давайте разберемся в серии шагов, которые помогут решить данную проблему.
1. Определите источник проблемы
Ваша ошибка указывает на конфликты зависимости в пакетах. Основная проблема — это несоответствие версий пакета libdpkg-perl
, который требует dpkg-dev
, и невозможность установки build-essential
из-за неудовлетворённых зависимостей.
2. Проверка и настройка источников пакетов
В первую очередь, необходимо проверить ваш файл /etc/apt/sources.list
и убедиться, что все необходимые репозитории включены. Это поможет системе найти и установить недостающие зависимости.
Ваш файл /etc/apt/sources.list
должен выглядеть следующим образом:
deb http://ua.archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb http://ua.archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb http://ua.archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
Убедитесь, что линии с deb
не закомментированы, то есть, перед ними нет знака #
.
3. Обновление системы
После внесения изменений выполните команды:
sudo apt update
sudo apt dist-upgrade
Эти команды обновят список пакетов и перейдут на новые версии, если такие имеются.
4. Устранение конфликта с пакетами
Проблема с удерживаемыми пакетами может быть решена следующим образом:
-
Попробуйте очистить список установленных пакетов:
sudo apt-get autoremove sudo apt-get autoclean
-
Попробуйте переустановить проблемные пакеты:
sudo apt-get install --reinstall dpkg-dev sudo apt-get install --reinstall build-essential
5. Попытка установки драйвера NVIDIA
После решения конфликтов зависимостей еще раз попробуйте установить драйверы NVIDIA:
sudo ubuntu-drivers autoinstall
Завершение и проверка
Если все шаги пройдены успешно, система должна установить необходимые драйверы без ошибок. Проблемы могут возникать из-за несоответствия используемых репозиториев, поэтому важно следить за актуальностью вашей системы и источников пакетов.
В случае повторных трудностей, проверьте логи системы или при необходимости обратитесь к сообществу Ubuntu для более детального анализа.