Não é possível remover o pacote nvidia-prime

1

Ao tentar mudar 14.10 para systemd eu corri para uma situação: Eu não posso remover o pacote 'nvidia-prime' e isso me impede de instalar o upstart ou systemd, então agora minha máquina não irá reiniciar. Como posso forçar o dpkg a remover esse pacote idiota?

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
    
por Barafu Albino 14.03.2015 / 20:57

2 respostas

3

Eu fiz isso. Tive que realmente cavar esse pacote de scripts

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

Lá eu vi a verificação da existência de /etc/init.d/nvidia-prime, então criei.

touch /etc/init.d/nvidia-prime

Em seguida, o pacote cordialmente permitido para reinstalar-se e, em seguida, excluir.

    
por Barafu Albino 14.03.2015 / 21:30
-1

Aqui está um link com quase a mesma resposta adequada à sua intenção.

O pacote nvidia-prime deve funcionar perfeito. É óbvio que as suas instalações da nvidia são "feitas em excesso" de alguma forma. Como descrito nas etapas aqui:

Eu tentaria seguir, caso a instalação seja um pouco exagerada:

  

sudo apt-get instala o ppa-purge

     

sudo apt-get purga nvidia *

     

sudo ppa-purga ppa: xorg-edgers / ppa

     

sudo reboot

De volta ao terminal, basta tentar apenas:

  

sudo add-apt-repositório ppa: graphics-drivers / ppa

     

sudo apt-get update

então isso aqui:

  

sudo apt-get instala nvidia-358 nvidia-prime

     

sudo apt-get install --reinstalar xserver-xorg

     

sudo reboot

por favor responda como comentário se isso foi de ajuda para esta situação.

(referência de:

Monitor duplo não funciona - Intel Graphics & amp; Nvidia 960m )

    
por dschinn1001 26.02.2016 / 01:27