我在CircleCI中使用Press [ENTER] to continue or ctrl-c to cancel adding it
时得到apt-get
。
如何自动绕过它?
我尝试使用-y
但没有效果!
答案 0 :(得分:2)
也许您可以考虑--force-yes
标志。从联机帮助页:
--force-yes
Force yes; this is a dangerous option that will cause apt to continue without prompting if it is doing something potentially harmful. It should not be
used except in very special situations. Using force-yes can potentially destroy your system! Configuration Item: APT::Get::force-yes.
所以...警告经纪人
您也可以使这些标志永久化。在/etc/apt/apt.conf.d/中创建一个文件,例如/etc/apt/apt.conf.d/90_no_prompt,其中包含以下内容:
APT::Get::Assume-Yes "true";
APT::Get::force-yes "true";
答案 1 :(得分:1)
此消息源于对add-apt-repository
的调用。
您可以使用-y
/ --yes
标记绕过它。见the manpage
例如:
sudo add-apt-repository --yes ppa:example/repository