Instalando o driver NVIDIA para o Debian Stretch

2

Estou tentando instalar o nvidia-driver para o Debian.

Li em todos os lugares que a solução correta é executar sudo apt install nvidia-driver e o driver deve se instalar sem problemas.

No entanto, este comando deixa-me com a saída

Reading package lists... Done
Building dependency tree       
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:
 nvidia-driver : Depends: nvidia-driver-libs (= 375.82-1~deb9u1) but it is not going to be installed
                 Depends: nvidia-driver-bin (= 375.82-1~deb9u1) but it is not going to be installed
                 Depends: xserver-xorg-video-nvidia (= 375.82-1~deb9u1) but it is not going to be installed
                 Depends: nvidia-vdpau-driver (= 375.82-1~deb9u1) but it is not going to be installed
                 Depends: nvidia-alternative (= 375.82-1~deb9u1)
                 Depends: nvidia-kernel-dkms (= 375.82-1~deb9u1) or
                          nvidia-kernel-375.82
                 Recommends: nvidia-settings (>= 375) but it is not going to be installed
                 Recommends: nvidia-persistenced
E: Unable to correct problems, you have held broken packages.

Eu tentei instalar as dependências ausentes (como sudo apt install nvidia-driver-libs ), mas isso só resulta em

Reading package lists... Done
Building dependency tree       
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:
 nvidia-driver-libs : Depends: libgl1-nvidia-glvnd-glx (= 375.82-1~deb9u1) but it is not going to be installed or
                               libgl1-nvidia-glx (= 375.82-1~deb9u1) but it is not going to be installed
                      Depends: nvidia-egl-icd (= 375.82-1~deb9u1) but it is not going to be installed or
                               libegl1-nvidia (= 375.82-1~deb9u1) but it is not going to be installed
                      Recommends: nvidia-driver-libs-i386
                      Recommends: libopengl0-glvnd-nvidia but it is not going to be installed
                      Recommends: libglx-nvidia0 (= 375.82-1~deb9u1) but it is not going to be installed
                      Recommends: libgles-nvidia1 (= 375.82-1~deb9u1) but it is not going to be installed
                      Recommends: libgles-nvidia2 (= 375.82-1~deb9u1) but it is not going to be installed
                      Recommends: libnvidia-cfg1 (= 375.82-1~deb9u1) but it is not going to be installed
                  Recommends: nvidia-vulkan-icd (= 375.82-1~deb9u1) but it is not going to be installed

Como eu instalo o nvidia-driver com o apt?

    
por Daniel 14.06.2018 / 14:02

2 respostas

5

Você precisa ativar os repositórios não livres:

sudo sed -i.bak 's/stretch[^ ]* main$/& contrib non-free/g' /etc/apt/sources.list

Em seguida, execute apt update e tente sua instalação novamente. Você provavelmente também precisará instalar os cabeçalhos do kernel se ainda não tiver:

sudo apt install linux-headers-$(uname -r)

Veja as instruções completas no wiki do Debian .

    
por 14.06.2018 / 14:07
1

Como isso ainda não tem uma resposta aceita, vou em frente e corto o que funcionou para mim. Eu estava tendo um problema muito semelhante, com muitos dos mesmos pacotes reclamando, mas havia dois problemas adicionais de PreDepends que stretch-backports não estava resolvendo. Acontece que, além das instruções na página wiki postada por Stephen ( link ), eu precisava adicionar a contribuição de stretch . Ou seja, em /etc/apt/sources.list , eu mudei

deb http://ftp.us.debian.org/debian/ stretch main

para

deb http://ftp.us.debian.org/debian/ stretch main contrib

e executei apt update , após o qual consegui instalar nvidia-drivers sem problemas. Espero que ajude se você ainda tiver problemas.

    
por 14.09.2018 / 18:26