gpt4 book ai didi

vagrant - 设置Vagrant的问题

转载 作者:行者123 更新时间:2023-12-04 11:36:52 27 4
gpt4 key购买 nike

我刚刚设置了一个新的Linux机器并尝试在其上安装vagrant。问题是,当我运行vagrant up命令时,出现以下错误:

Vagrant failed to initialize at a very early stage:

The directory Vagrant will use to store local environment-specificstate is not accessible. The directory specified as the local datadirectory must be both readable and writable for the user that isrunning Vagrant.


任何想法如何解决这个问题?

最佳答案

我认为一种更好的方法是通过使用户成为所有者来为用户提供对目录的必需权限-您希望在其中引导vagrant:

$ sudo chown -R <user> <directory>

然后您将能够轻松地执行以下操作:
$ vagrant up

sudo用作 vagrant up是不常见的,因为您为什么要以root用户身份运行虚拟机。

关于vagrant - 设置Vagrant的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29438015/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com