gpt4 book ai didi

ruby - 为什么在 Vagrant 上的当前用户下安装 rvm 时需要另一个用户?

转载 作者:行者123 更新时间:2023-12-04 18:40:40 24 4
gpt4 key购买 nike

添加了一个名为 deploy 的用户在 Vagrant 。然后改成deploy用户:

vagrant@vagrant:~$ su - deploy
deploy@vagrant:~$

现在安装 rvm :
deploy@vagrant:~$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: directory `/home/deploy/.gnupg' created
gpg: new configuration file `/home/deploy/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/deploy/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/deploy/.gnupg/secring.gpg' created
gpg: keyring `/home/deploy/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /home/deploy/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
deploy@vagrant:~$ curl -sSL https://get.rvm.io | bash -s stable
mktemp: failed to create file via template ‘/home/vagrant/.rvm/rvm-exec-test.XXXXXX’: Permission denied

为什么说这个目录:
/home/vagrant/... : Permission denied

我已阅读安装脚本:

https://raw.githubusercontent.com/wayneeseguin/rvm/master/binscripts/rvm-installer



但不知道为什么。

最佳答案

你仍然从 /home/vagrant/ 运行它所以在你这样做之后

vagrant@vagrant:~$ su - deploy
deploy@vagrant:~$

你需要做
deploy@vagrant:~$ cd

所以它将转到部署用户的主文件夹并安装在那里

关于ruby - 为什么在 Vagrant 上的当前用户下安装 rvm 时需要另一个用户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44583233/

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