pkg update -f
pkg install php81
What happens when you do
Code:pkg update -f pkg install php81
root@Spider:~ # pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
Fetching packagesite.pkg: 100% 6 MiB 3.4MB/s 00:02
Processing entries: 100%
FreeBSD repository update completed. 32337 packages processed.
All repositories are up to date.
root@Spider:~ # pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
Fetching packagesite.pkg: 100% 6 MiB 3.4MB/s 00:02
Processing entries: 100%
FreeBSD repository update completed. 32337 packages processed.
All repositories are up to date.
root@Spider:~ # pkg install php81
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
php81: 8.1.11
Number of packages to be installed: 1
The process will require 27 MiB more space.
4 MiB to be downloaded.
Proceed with this action? [y/N]: y
[1/1] Fetching php81-8.1.11.pkg: 100% 4 MiB 2.3MB/s 00:02
Checking integrity... done (2 conflicting)
- php81-8.1.11 conflicts with php74-7.4.32 on /usr/local/bin/php
- php81-8.1.11 conflicts with php74-json-7.4.32 on /usr/local/include/php/ext/json/php_json.h
Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
The following 8 package(s) will be affected (of 0 checked):
Installed packages to be REMOVED:
php74: 7.4.32
php74-curl: 7.4.32
php74-gd: 7.4.32
php74-json: 7.4.32
php74-mbstring: 7.4.32
php74-mysqli: 7.4.32
php74-zlib: 7.4.32
New packages to be INSTALLED:
php81: 8.1.11
Number of packages to be removed: 7
Number of packages to be installed: 1
The operation will free 4 MiB.
Proceed with this action? [y/N]: y
[1/8] Deinstalling php74-zlib-7.4.32...
[1/8] Deleting files for php74-zlib-7.4.32: 100%
[2/8] Deinstalling php74-gd-7.4.32...
[2/8] Deleting files for php74-gd-7.4.32: 100%
[3/8] Deinstalling php74-mbstring-7.4.32...
[3/8] Deleting files for php74-mbstring-7.4.32: 100%
[4/8] Deinstalling php74-mysqli-7.4.32...
[4/8] Deleting files for php74-mysqli-7.4.32: 100%
[5/8] Deinstalling php74-curl-7.4.32...
[5/8] Deleting files for php74-curl-7.4.32: 100%
[6/8] Deinstalling php74-json-7.4.32...
[6/8] Deleting files for php74-json-7.4.32: 100%
[7/8] Deinstalling php74-7.4.32...
[7/8] Deleting files for php74-7.4.32: 100%
[8/8] Installing php81-8.1.11...
[8/8] Extracting php81-8.1.11: 100%
root@Spider:~ #
root@Spider:~ # pkg info |grep php
mod_php74-7.4.32_1 PHP Scripting Language
php81-8.1.11 PHP Scripting Language (8.1.X branch)
Sorry for the confusion, not parallel. Remove the old version install the new version with the needed subsidiaries.If you want different parallel versions of php you can better install the different versions in different jails.
Because they write to the same files there is overlap & they take the dependencies with them.
pkg query %n | grep php74 | sed 's/74/80/'
pkg query %n | grep php74 | sed 's/74/80/' | xargs -I {} pkg install -f -y {}
Okay, that looks more like it. I will give that a try. Thank you very much.To have a list of all the new packages you want to install you can do:
To force the installation of them,Code:pkg query %n | grep php74 | sed 's/74/80/'
That command will replace all php74- modules with php80- modulesCode:pkg query %n | grep php74 | sed 's/74/80/' | xargs -I {} pkg install -f -y {}
Read /usr/ports/UPDATING:Is there a way to havepkg
upgrade this?
20220125:
AFFECTS: users of lang/php74
AUTHOR: tz@FreeBSD.org
The default version of PHP has been switched from 7.4 to 8.0.
If you use binary packages you should make a list of php packages
before running 'pkg upgrade':
# pkg info \*php7\* > ~/installed-php-ports-list
After the upgrade, check with such list if all your php extensions
are still installed, and reinstall them if needed.
If you use mod_php74 you need to deinstall it and install mod_php80.