it-swarm.it

Come forzare la rimozione di un pacchetto in Arch con pacman?

Come forzare la rimozione di un pacchetto in Arch con pacman mentre altri pacchetti dipendono ancora da esso.

pacman -R Perl-libwww                                                               
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: Perl-app-cpanminus: requires Perl-libwww>=5.828
:: Perl-app-pmuninstall: requires Perl-libwww
:: Perl-app-sd: requires Perl-libwww
:: Perl-catalyst-action-rest: requires Perl-libwww>=2.033 
:: Perl-catalyst-runtime: requires Perl-libwww>=1.64
:: Perl-cpan: requires Perl-libwww
:: Perl-cpan-mini: requires Perl-libwww
:: Perl-cpan-uploader: requires Perl-libwww
:: Perl-feed-find: requires Perl-libwww
:: Perl-http-body: requires Perl-libwww
:: Perl-http-request-ascgi: requires Perl-libwww
:: Perl-module-cpants-analyse: requires Perl-libwww
:: Perl-module-install: requires Perl-libwww>=5.812
:: Perl-net-trac: requires Perl-libwww
:: Perl-net-whois-raw: requires Perl-libwww
:: Perl-prophet: requires Perl-libwww
:: Perl-rt-client-rest: requires Perl-libwww
:: Perl-uri-fetch: requires Perl-libwww
:: Perl-www-mechanize: requires Perl-libwww
:: Perl-xml-atom: requires Perl-libwww
:: Perl-xml-feed: requires Perl-libwww

sostanzialmente LWP 6 ha diviso un sacco di pacchetti e devo rimuoverlo per poterlo reinstallare.

66
xenoterracide

Dovresti essere in grado di reinstallare il pacchetto con un semplice:

# pacman -S Perl-libwww

Questo rimuoverà solo Perl-libwww:

# pacman -Rdd Perl-libwww

Nota il doppio - d nel comando, se usi - nodeps devi specificare anche quello due volte o combinarlo con un - d = come:

# pacman -R --nodeps --nodeps Perl-libwww
# pacman -Rd --nodeps Perl-libwww

Questo rimuove tutti i pacchetti che dipendono da Perl-libwww:

# pacman -Rc Perl-libwww

Dalla pagina man di pacman:

   -d, --nodeps
       Skips dependency version checks. Package names are still
       checked. Normally, pacman will always check a package’s
       dependency fields to ensure that all dependencies are
       installed and there are no package conflicts in the
       system. Specify this option twice to skip all dependency
       checks.
   -c, --cascade
       Remove all target packages, as well as all packages that
       depend on one or more target packages. This operation is
       recursive, and must be used with care since it can remove
       many potentially needed packages.
102
Kambus