2017-08-07 153 views
1

我在CircleCI中使用apt-get时得到Press [ENTER] to continue or ctrl-c to cancel adding it。 我怎样才能自动绕过它?
我试过用-y但没效果!apt-get:如何绕过按ENTER键

+0

它不是很清楚该消息出现什么情况。围绕这个信息发生了什么?也许添加一个apt库密钥?也许你可以通过明确操作来解决它,也许有一定的选择来解决这个问题。 –

回答

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"; 
0

此消息来自于add-apt-repository通话茎。

您可以用-y/--yes标志绕过它。见the manpage

例如像这样:

sudo add-apt-repository --yes ppa:example/repository