4

I am using Ubuntu 14.04 with its default PHP (version 5.5.9).

If I upgrade to Ubuntu 16.04, the PHP will be also upgraded to version 7 or it will stay as is? I know that the old PHP version was removed from Ubuntu 16.04 but this is the exact version I need.

Dinly
  • 41

3 Answers3

3

If you want to hold back a package version while upgrading, use

echo "package hold" | sudo dpkg --set-selections

to remove the hold back and upgrade the package, use

echo "package install" | sudo dpkg --set-selections

OR,

To hold sudo aptitude hold package_name

To unhold sudo aptitude unhold package_name

Here, replace 'package' with the exact package name. Hope this helps

2

The update process should be replacing php5 with php7.

Assuming you're running a production service, you may want to check your application against php7 beforehand, on a separate system.

SYN
  • 2,831
1

I've never perform an upgrade release so I don't know much about what it will do and will the packages upgraded to stable version.

But AFAIK the upgrade process should upgrade additional package as well, so yeah it seems you'll have to work with PHP7 while you need PHP5 on 16.04 release.

There are several ways to downgrade PHP7 to PHP5 in xenial.

  • Install PHP 5.6 via Third Party Repository, this method described nicely in this answer. (EASIER)
  • Apply Trusty (14.04) repository, then install PHP5 from trusty repository.
Liso
  • 15,377
  • 3
  • 51
  • 80