我正在从 Vagrantfile 运行以下脚本,一切正常。最后,我看到了go1.10 linux/amd64预期的输出。
但是,当我跑步时,vagrant ssh我得到了The program 'go' is currently not installed。
govagrant provision that be able to see和vagrant sshthat not able to see之间有什么区别go?
config.vm.box = "ubuntu/xenial64"
config.vm.provision "shell" do |s|
s.inline = "
sudo apt-get update
export GOPATH=$HOME/work
sudo curl -O https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz
sudo tar -xvf go1.10.linux-amd64.tar.gz
sudo mv go /usr/local
sudo echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
export PATH=$PATH:/usr/local/go/bin
go version" # this row is working fine on the script but not after ssh
end
ITMISS
相关分类