【发布时间】:2019-01-25 10:44:44
【问题描述】:
我正在关注本教程:https://docs.pybossa.com/installation/vagrant/ 但是由于我在我的 Windows 7 机器上没有权限,所以我使用我的 VM 来部署 vagrant & co。一旦我终于让它工作了,就开始安装需求并且盒子完全卡住了。
主机(VM):Linux ipf7028 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Vagrant 提供者:默认,VirtualBox
一旦盒子最终启动,我必须在 ssh python run.py 中执行,但我有一个错误,因为我是 python 的新手,我刚刚安装了 pip 并做了提供的 pip install -r requirements.txt。
并且在一些下载后,全局崩溃并出现以下错误:
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/environment.rb:836:in `initialize': No space left on device @ rb_sysopen - /root/.vagrant.d/perm_test_YCKSPNYMOHEIFYNPVJKQYEMPHUIXGQUN (Errno::ENOSPC)
from /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/environment.rb:836:in `open'
from /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/environment.rb:836:in `open'
from /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/environment.rb:836:in `setup_home_path'
from /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/environment.rb:135:in `initialize'
from /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/bin/vagrant:145:in `new'
from /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/bin/vagrant:145:in `<main>'
这显然是有磁盘空间的东西,但我不知道在哪里......另外我没有任何访问 vagrant box,没有命令行正在工作......销毁,停止,ssh,状态一切结束输出相同的错误。
提供的 VagrantFile :
# -*- mode: ruby -*-
# vi: set ft=ruby :
# PyBossa Vagrantfile
VAGRANTFILE_API_VERSION = "2"
# Ansible install script for Ubuntu
$ansible_install_script = <<SCRIPT
export DEBIAN_FRONTEND=noninteractive
echo Check if Ansible existing...
if ! which ansible >/dev/null; then
echo update package index files...
apt-get update -qq
echo install Ansible...
apt-get install -qq ansible
fi
SCRIPT
$ansible_local_provisioning_script = <<SCRIPT
export DEBIAN_FRONTEND=noninteractive
export PYTHONUNBUFFERED=1
echo PyBossa provisioning with Ansible...
ansible-playbook -u vagrant /vagrant/provisioning/playbook.yml -i /vagrant/provisioning/ansible_hosts -c local
SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
end
config.vm.network :forwarded_port, host: 5000, guest: 5000
config.vm.network :forwarded_port, host: 5001, guest: 5001
# turn off warning message `stdin: is not a tty error`
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
# be sure that there is Ansible for local provisioning
config.vm.provision "shell", inline: $ansible_install_script
# do the final Ansible local provisioning
config.vm.provision "shell", inline: $ansible_local_provisioning_script
end
这个盒子应该可以正常工作,即使virtualenv应该处理一些关于需求的问题......(以前从未使用过)。
我错过了什么?
【问题讨论】:
标签: python vagrant virtual-machine