How can I install PHP 5.5.9 with Ubuntu 12.04 on vagrant?
<p>There isn't really much more to this than the title suggests. </p>

<p>My Vagrantfile is as such:</p>

<pre><code>VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
  config.vm.box = "precise64"

  config.vm.box_url = "http://files.vagrantup.com/precise64.box"
  config.vm.network :private_network, ip: "192.168.33.21"
  config.vm.provision :shell, :path =&gt; "install.sh"
  config.vm.synced_folder ".", "/var/www", 
      owner: "www-data", group: "www-data"
end
</code></pre>

<p>The install.sh file that provisions the server contains these lines:</p>

<pre><code>sudo apt-get install -y vim curl python-software-properties
sudo add-apt-repository -y 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 drush
</code></pre>

<p>This provides me with the following version of PHP</p>

<pre><code> PHP 5.5.34-1+deb.sury.org~precise+1 (cli) (built: Mar 31 2016 15:14:00)
</code></pre>

<p>However, to replicate my production environment I need 5.5.9.  Do you know can I can specify that version?  I've read that adding the version number (e.g. php5=5.5.9) after php5 package should work but it doesn't for me.</p>

<p>I'm really confused and any advice would be greatly recieved.</p>

<p>Thanks  </p>