我希望安装 archlinux 软件包 base-devel 中的所有选项。
当我发出命令“sudo pacman -S --needed base-devel”时,我得到:
[vagrant@archlinux ~]$ sudo pacman -S --needed base-devel
warning: file-5.40-5 is up to date -- skipping
warning: findutils-4.8.0-1 is up to date -- skipping
warning: gawk-5.1.0-1 is up to date -- skipping
warning: gettext-0.21-1 is up to date -- skipping
warning: grep-3.6-1 is up to date -- skipping
warning: gzip-1.11-1 is up to date -- skipping
warning: pacman-6.0.1-1 is up to date -- skipping
warning: sed-4.8-1 is up to date -- skipping
warning: sudo-1.9.7.p2-1 is up to date -- skipping
:: There are 15 members in group base-devel:
:: Repository core
1) autoconf 2) automake 3) binutils 4) bison 5) fakeroot 6) flex 7) gcc
8) groff 9) libtool 10) m4 11) make 12) patch 13) pkgconf 14) texinfo
15) which
Enter a selection (default=all):
如何避免出现交互式提示以选择要安装的软件包。
答案1
您可以使用--noconfirm
以避免交互式提示。请注意,这将为所有提示选择默认选择,而不仅仅是多选提示。
man pacman
说:
绕过所有“你确定吗?”消息。除非您想从脚本运行 pacman,否则这样做不是一个好主意。