无业游民条款不起作用

编程入门 行业动态 更新时间:2024-10-25 09:35:58
本文介绍了无业游民条款不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我在使用 vagrant 规定安装软件时遇到问题.我只是尝试安装 git,但出现此错误:

I have a problem with installing softwares using the vagrant provisions . I just tried to install git but I get this error :

==> default: stdin: is not a tty
==> default:   git-email git-gui gitk gitweb diffutils-doc
==> default: The following NEW packages will be installed:
==> default:   git git-man liberror-perl patch
==> default: 0 upgraded, 4 newly installed, 0 to remove and 179 not   upgraded.
==> default: Need to get 6,730 kB of archives.
==> default: After this operation, 15.4 MB of additional disk space will be used.
==> default: Do you want to continue [Y/n]?
==> default: Abort.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

我的 Vargantfile 看起来是这样:

my Vargantfile looks so :

Vagrant.configure(2) do |config|
 config.vm.box = "hashicorp/precise32"
 config.vm.provision "shell", path: "bootstrap.sh"
end

而我的 bootstrap.sh 正好包含:

and my bootstrap.sh contains exactly :

#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install git

我在 mac 和 windows 上尝试过,得到同样的错误,我使用的是 vagrant 1.7.2

I tried it on mac and windows and get the same errors , I am using vagrant 1.7.2

推荐答案

从引导文件安装东西时需要添加 -y 标志,否则系统将等待确认

You need to add the -y flag when installing stuff from your bootstrap file, otherwise the system will wait for a confirmation

sudo apt-get -y install git

这篇关于无业游民条款不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-28 07:45:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1169714.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无业游民   不起作用   条款

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!