it-swarm.cn

如何使用pacman强制在Arch中删除软件包?

我如何在pacman中强制删除Arch中的软件包,而其他软件包仍然依赖于它。

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

基本上,LWP 6会拆分一大堆软件包,因此我需要将其删除以便重新安装。

66
xenoterracide

您应该可以使用以下简单的方法重新安装该软件包:

# pacman -S Perl-libwww

这只会删除Perl-libwww:

# pacman -Rdd Perl-libwww

请注意命令中的双-d,如果使用-nodeps,则必须指定两次,也可以将其与-d组合使用=喜欢:

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

这将删除所有依赖于Perl-libwww的软件包:

# pacman -Rc Perl-libwww

在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