念のためPHP8.2があるか確認$ sudo apt show php8.2 Package: php8.2 Version: 8.2.8-1+ubuntu22.04.1+deb.sury.org+1 Priority: optional Section: php Maintainer: Debian PHP Maintainers <team+pkg-php@tracker.debian.org> Installed-Size: 67.6 kB Provides: php Depends: libapache2-mod-php8.2 | php8.2-fpm | php8.2-cgi, php8.2-common Download-Size: 32.2 kB APT-Sources: https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 Packages Description: server-side, HTML-embedded scripting language (metapackage) This package is a metapackage that, when installed, guarantees that you have at least one of the four server-side versions of the PHP interpreter installed. Removing this package won’t remove PHP from your system, however it may remove other packages that depend on this one. . PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
PHP8.2本体をインストールする$ sudo apt install php8.2
導入バージョンを確認する$ php -v PHP 8.2.8 (cli) (built: Jul 8 2023 07:10:21) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.8, Copyright (c) Zend Technologies with Zend OPcache v8.2.8, Copyright (c), by Zend Technologies
インストーラーを起動する$ php ./composer-setup.php All settings correct for using Composer Downloading… Composer (version 2.5.8) successfully installed to: /home/tts/composer.phar Use it: php composer.phar