1 votes

Impossible de supprimer le paquet nvidia-prime

En essayant de passer la version 14.10 à systemd, j'ai rencontré un problème : Je ne peux pas supprimer le paquet 'nvidia-prime' et cela m'empêche d'installer upstart ou systemd, donc maintenant ma machine ne redémarre pas. Comment forcer dpkg à supprimer ce paquet stupide ?

dpkg --force-all -P nvidia-prime
(Reading database ... 204460 files and directories currently installed.)
Removing nvidia-prime (0.6.7) ...
Failed to issue method call: Unit nvidia-prime.service not loaded.
invoke-rc.d: initscript nvidia-prime, action "stop" failed.
dpkg: error processing package nvidia-prime (--purge):
 subprocess installed pre-removal script returned error exit status 5
Failed to issue method call: Unit nvidia-prime.service failed to load: No such file or directory.
invoke-rc.d: initscript nvidia-prime, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
 nvidia-prime
root@Shamaniak:~# dpkg -P nvidia-prime
(Reading database ... 204460 files and directories currently installed.)
Removing nvidia-prime (0.6.7) ...
Failed to issue method call: Unit nvidia-prime.service not loaded.
invoke-rc.d: initscript nvidia-prime, action "stop" failed.
dpkg: error processing package nvidia-prime (--purge):
 subprocess installed pre-removal script returned error exit status 5
Failed to issue method call: Unit nvidia-prime.service failed to load: No such file or directory.
invoke-rc.d: initscript nvidia-prime, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
 nvidia-prime

apt-get install -fm upstart
Reading package lists... Done
Building dependency tree       
Reading state information... Done
upstart is already the newest version.
upstart set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up nvidia-prime (0.6.7) ...
Failed to issue method call: Unit nvidia-prime.service failed to load: No such file or directory.
invoke-rc.d: initscript nvidia-prime, action "start" failed.
dpkg: error processing package nvidia-prime (--configure):
 subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
 nvidia-prime
E: Sub-process /usr/bin/dpkg returned an error code (1)

apt-get install systemd-sysv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  nvidia-prime upstart
The following NEW packages will be installed:
  systemd-sysv
0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/8 548 B of archives.
After this operation, 700 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 204460 files and directories currently installed.)
Removing nvidia-prime (0.6.7) ...
Failed to issue method call: Unit nvidia-prime.service not loaded.
invoke-rc.d: initscript nvidia-prime, action "stop" failed.
dpkg: error processing package nvidia-prime (--remove):
 subprocess installed pre-removal script returned error exit status 5
Failed to issue method call: Unit nvidia-prime.service failed to load: No such file or directory.
invoke-rc.d: initscript nvidia-prime, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 6
dpkg: upstart: dependency problems, but removing anyway as you requested:
 friendly-recovery depends on upstart | systemd-sysv; however:
  Package upstart is to be removed.
  Package systemd-sysv is not installed.
 nvidia-prime depends on upstart.

Removing upstart (1.13.2-0ubuntu2) ...
Processing triggers for man-db (2.7.0.2-2) ...
Errors were encountered while processing:
 nvidia-prime
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@Shamaniak:~# apt-get purge nvidia-prime
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:
 friendly-recovery : Depends: upstart or
                              systemd-sysv but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@Shamaniak:~# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  upstart
Suggested packages:
  graphviz upstart-monitor
The following NEW packages will be installed:
  upstart
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/118 kB of archives.
After this operation, 671 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Selecting previously unselected package upstart.
(Reading database ... 204423 files and directories currently installed.)
Preparing to unpack .../upstart_1.13.2-0ubuntu2_amd64.deb ...
Unpacking upstart (1.13.2-0ubuntu2) ...
Processing triggers for man-db (2.7.0.2-2) ...
Processing triggers for dbus (1.8.8-1ubuntu2.1) ...
Setting up upstart (1.13.2-0ubuntu2) ...
Setting up nvidia-prime (0.6.7) ...
Failed to issue method call: Unit nvidia-prime.service failed to load: No such file or directory.
invoke-rc.d: initscript nvidia-prime, action "start" failed.
dpkg: error processing package nvidia-prime (--configure):
 subprocess installed post-installation script returned error exit status 6
Errors were encountered while processing:
 nvidia-prime
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@Shamaniak:~# sudo apt-get install --reinstall nvidia-prime
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for nvidia-prime:amd64

4voto

Karl Points 386

Je l'ai fait. J'ai dû me plonger dans le script de ce paquet

cat /var/lib/dpkg/info/nvidia-prime.postinst

J'ai vu qu'il vérifiait l'existence de /etc/init.d/nvidia-prime et je l'ai donc créé.

touch /etc/init.d/nvidia-prime

Ensuite, le paquet est cordialement autorisé à se réinstaller, puis à être supprimé.

-1voto

nojevive Points 1030

Voici le lien d'une réponse presque identique à votre intention.

Le paquet nvidia-prime devrait fonctionner parfaitement. Il est évident que vos installations nvidia sont "surfaites" d'une manière ou d'une autre. Comme décrit dans les étapes ici :

J'essaierais de suivre ce qui suit au cas où l'installation serait un peu trop poussée :

sudo apt-get install ppa-purge

sudo apt-get purge nvidia*

sudo ppa-purge ppa:xorg-edgers/ppa

sudo reboot

De retour dans le terminal, essayez simplement ceci :

sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt-get update

puis ceci ici :

sudo apt-get install nvidia-358 nvidia-prime

sudo apt-get install --reinstall xserver-xorg

sudo reboot

merci de répondre en commentaire si cela vous a aidé dans votre situation.

(référence de :

Le double écran ne fonctionne pas - Intel Graphics & Nvidia 960m )

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X