Aku nok pakai php 8.2, jadi kena upgrade bullseye ke bookworm. step untuk upgrade adalah sebagaimana di bawah:-
root@local:/# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
root@local:/# uname -a
Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 GNU/Linux
root@local:/# cat /etc/apt/source.list
deb http://deb.debian.org/debian bullseye main
deb http://deb.debian.org/debian bullseye-updates main
deb http://security.debian.org/debian-security bullseye-security main
deb http://ftp.debian.org/debian bullseye-backports main
Change source.list from bullseye to bookworm with vi/nano/pico
deb http://deb.debian.org/debian bookworm main
deb http://deb.debian.org/debian bookworm-updates main
deb http://security.debian.org/debian-security bookworm-security main
deb http://ftp.debian.org/debian bookworm-backports main
root@local:/# apt update
root@local:/# apt upgrade --without-new-pkgs
Perform full-upgrade will replace php 8.1 to new php 8.2 ( if previous wsl2 installed with linux bullseye has php 8.1 )
root@local:/# apt full-upgrade
After that, validate php version
root@local:/# php -v
PHP 8.2.10 (cli) (built: Sep 4 2023 08:11:43) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.10, Copyright (c) Zend Technologies
with Zend OPcache v8.2.10, Copyright (c), by Zend Technologies
root@local:/# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
Photo by Kevin Horvat on Unsplash