title: Wordpress + Vagrant : The SSH command responded with a non-zero exit status
body: <p>I am following <a href="https://premium.wpmudev.org/blog/vagrant-wordpress-test-environment/?nhp=b&amp;utm_expid=3606929-87.FQUx5sKvRhKbhK_8_C59WQ.1" rel="nofollow">this tutorial</a> to set up Wordpress with vagrant. But it does not seem to work.</p>
  
  <p>I get the following:</p>
  
  <pre><code>==&gt; default: gpg: 
  ==&gt; default: keyring `/tmp/tmpJZaDWh/secring.gpg' created
  ==&gt; default: gpg: 
  ==&gt; default: keyring `/tmp/tmpJZaDWh/pubring.gpg' created
  ==&gt; default: gpg: 
  ==&gt; default: requesting key E5267A6C from hkp server keyserver.ubuntu.com
  ==&gt; default: gpg: 
  ==&gt; default: /tmp/tmpJZaDWh/trustdb.gpg: trustdb created
  ==&gt; default: gpg: 
  ==&gt; default: key E5267A6C: public key "Launchpad PPA for Ond\xc5\x99ej Sur?" imported
  ==&gt; default: gpg: 
  ==&gt; default: Total number processed: 1
  ==&gt; default: gpg: 
  ==&gt; default:               imported: 1
  ==&gt; default:   (RSA: 1)
  </code></pre>
  
  <p>and then:</p>
  
  <pre><code>==&gt; default: E
  ==&gt; default: : 
  ==&gt; default: Unable to correct problems, you have held broken packages.
  ==&gt; default: tee: 
  ==&gt; default: /etc/php5/mods-available/xdebug.ini
  ==&gt; default: : No such file or directory
  ==&gt; default: xdebug.scream=1
  ==&gt; default: xdebug.cli_color=1
  ==&gt; default: xdebug.show_local_vars=1
  ==&gt; default: sudo
  ==&gt; default: : 
  ==&gt; default: a2enmod: command not found
  ==&gt; default: sed: can't read /etc/php5/apache2/php.ini: No such file or directory
  ==&gt; default: sed: can't read /etc/php5/apache2/php.ini: No such file or directory
  ==&gt; default: sed: can't read /etc/php5/cli/php.ini: No such file or directory
  ==&gt; default: apache2: unrecognized service
  ==&gt; default: /tmp/vagrant-shell: line 26: php: command not found
  ==&gt; default: mv: 
  ==&gt; default: cannot stat `composer.phar'
  ==&gt; default: : No such file or directory
  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.
  </code></pre>
  
  <p>I do not know what this means, really, or where the problem could lie. Vagrant does work though, I have been able to start up a vagrant box before without errors. It is just in the context of the above mentioned tutorial that I run into problems.</p>
  
  <p>edit:
  following the advice here, I have changed my vagrantfile &amp; the install.sh. However, I still get the same error. Here are my modified files:</p>
  
  <p><strong>Vagrantfile</strong>:</p>
  
  <pre><code># -*- mode: ruby -*-
  # vi: set ft=ruby :
  
  # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
  VAGRANTFILE_API_VERSION = "2"
  
  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    config.vm.box = "ubuntu/precise64"
    config.vm.network :private_network, ip: "192.168.33.21"
    config.vm.provision :shell, :path =&gt; "install.sh"
    config.vm.synced_folder ".", "/var/www"
  
  end
  </code></pre>
  
  <p><strong>install.sh</strong></p>
  
  <pre><code>sudo apt-get update
  
  sudo debconf-set-selections &lt;&lt;&lt; 'mysql-server mysql-server/root_password password root'
  sudo debconf-set-selections &lt;&lt;&lt; 'mysql-server mysql-server/root_password_again password root'
  
  sudo apt-get install -y vim curl python-software-properties
  sudo add-apt-repository ppa:ondrej/php5
  sudo apt-get update
  
  sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug
  
  cat &lt;&lt; EOF | sudo tee -a /etc/php5/mods-available/xdebug.ini
  xdebug.scream=1
  xdebug.cli_color=1
  xdebug.show_local_vars=1
  EOF
  
  sudo a2enmod rewrite
  
  sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini
  sed -i "s/display_errors = .*/display_errors = On/" /etc/php5/apache2/php.ini
  sed -i "s/disable_functions = .*/disable_functions = /" /etc/php5/cli/php.ini
  
  sudo service apache2 restart
  
  curl -sS https://getcomposer.org/installer | php
  sudo mv composer.phar /usr/local/bin/composer
  </code></pre>