Raspbery PIにLaravel11をインストール

# 概要
RPI3Bが余ってましたので、今回最新OSをインストール後、Laravel11をインストールする方法についてメモです。

# 事前に実行するコマンド
下記のコマンドを１つ１つ実行してインストールを行ってください。

~~~bash
sudo wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

apt list --upgradable

sudo apt update

sudo apt-get upgrade
~~~

# composerインストール
下記のコマンドからインストールします。

①ダウンロードコマンド
~~~
wget https://getcomposer.org/download/2.7.7/composer.phar
~~~

②実行結果
~~~
pi@RPI3B:~ $ wget https://getcomposer.org/download/2.7.7/composer.phar
--2024-07-29 22:24:51--  https://getcomposer.org/download/2.7.7/composer.phar
Resolving getcomposer.org (getcomposer.org)... 54.36.53.46
Connecting to getcomposer.org (getcomposer.org)|54.36.53.46|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2994603 (2.9M) [application/octet-stream]
Saving to: 'composer.phar'

composer.phar       100%[===================>]   2.86M   948KB/s    in 3.1s

2024-07-29 22:24:56 (948 KB/s) - 'composer.phar' saved [2994603/2994603]

pi@RPI3B:~ $
~~~

③composer.pharをcomposerファイル名に変更及び実行権限を付与して/usr/bin/フォルダへ移動
~~~
pi@RPI3B:~ $ sudo mv composer.phar /usr/bin/composer
pi@RPI3B:~ $ sudo chmod 777 /usr/bin/composer
~~~

④composerのバージョン確認
~~~
pi@RPI3B:~ $ composer -V
Composer version 2.7.7 2024-06-10 22:11:12
PHP version 8.3.9 (/usr/bin/php8.3)
Run the "diagnose" command to get more detailed diagnostics output.
~~~

# Apacheインストール
下記のコマンドからApacheをインストールします。

①インストールコマンド
~~~
sudo apt install -y libapache2-mod-php8.3
~~~

②実行結果
~~~
pi@RPI3B:~ $ sudo apt install -y libapache2-mod-php8.3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php8.3 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,263 kB of archives.
After this operation, 11.1 MB of additional disk space will be used.
Get:1 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libapr1 armhf 1.7.2-3 [82.4 kB]
Get:2 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libaprutil1 armhf 1.6.3-1 [75.2 kB]
Get:3 https://packages.sury.org/php bookworm/main armhf libapache2-mod-php8.3 armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [1,425 kB]
Get:4 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libaprutil1-dbd-sqlite3 armhf 1.6.3-1 [12.3 kB]
Get:5 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libaprutil1-ldap armhf 1.6.3-1 [11.3 kB]
Get:6 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf apache2-bin armhf 2.4.61-1~deb12u1 [1,069 kB]
Get:7 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf apache2-data all 2.4.61-1~deb12u1 [160 kB]
Get:8 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf apache2-utils armhf 2.4.61-1~deb12u1 [206 kB]
Get:9 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf apache2 armhf 2.4.61-1~deb12u1 [222 kB]
Fetched 3,263 kB in 11s (307 kB/s)
Selecting previously unselected package libapr1:armhf.
(Reading database ... 216455 files and directories currently installed.)
Preparing to unpack .../0-libapr1_1.7.2-3_armhf.deb ...
Unpacking libapr1:armhf (1.7.2-3) ...
Selecting previously unselected package libaprutil1:armhf.
Preparing to unpack .../1-libaprutil1_1.6.3-1_armhf.deb ...
Unpacking libaprutil1:armhf (1.6.3-1) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:armhf.
Preparing to unpack .../2-libaprutil1-dbd-sqlite3_1.6.3-1_armhf.deb ...
Unpacking libaprutil1-dbd-sqlite3:armhf (1.6.3-1) ...
Selecting previously unselected package libaprutil1-ldap:armhf.
Preparing to unpack .../3-libaprutil1-ldap_1.6.3-1_armhf.deb ...
Unpacking libaprutil1-ldap:armhf (1.6.3-1) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../4-apache2-bin_2.4.61-1~deb12u1_armhf.deb ...
Unpacking apache2-bin (2.4.61-1~deb12u1) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../5-apache2-data_2.4.61-1~deb12u1_all.deb ...
Unpacking apache2-data (2.4.61-1~deb12u1) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../6-apache2-utils_2.4.61-1~deb12u1_armhf.deb ...
Unpacking apache2-utils (2.4.61-1~deb12u1) ...
Selecting previously unselected package apache2.
Preparing to unpack .../7-apache2_2.4.61-1~deb12u1_armhf.deb ...
Unpacking apache2 (2.4.61-1~deb12u1) ...
Selecting previously unselected package libapache2-mod-php8.3.
Preparing to unpack .../8-libapache2-mod-php8.3_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking libapache2-mod-php8.3 (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Setting up libapr1:armhf (1.7.2-3) ...
Setting up apache2-data (2.4.61-1~deb12u1) ...
Setting up libaprutil1:armhf (1.6.3-1) ...
Setting up libaprutil1-ldap:armhf (1.6.3-1) ...
Setting up libaprutil1-dbd-sqlite3:armhf (1.6.3-1) ...
Setting up apache2-utils (2.4.61-1~deb12u1) ...
Setting up apache2-bin (2.4.61-1~deb12u1) ...
Setting up libapache2-mod-php8.3 (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Package apache2 is not configured yet. Will defer actions by package libapache2-mod-php8.3.

Creating config file /etc/php/8.3/apache2/php.ini with new version
No module matches
Setting up apache2 (2.4.61-1~deb12u1) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
info: Switch to mpm prefork for package libapache2-mod-php8.3
Module mpm_event disabled.
Enabling module mpm_prefork.
info: Executing deferred 'a2enmod php8.3' for package libapache2-mod-php8.3
Enabling module php8.3.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service �� /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service �� /lib/systemd/system/apache-htcacheclean.service.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u7) ...
Processing triggers for libapache2-mod-php8.3 (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
pi@RPI3B:~ $
~~~

# PHP8.3インストール
下記のコマンドからPHP8.3をインストールします。

①インストールコマンド
~~~
sudo apt install -y php8.3-common php8.3-cli
~~~

②実行結果
~~~
pi@RPI3B:~ $ sudo apt install -y php8.3-common php8.3-cli
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  debsuryorg-archive-keyring php-common php8.3-opcache php8.3-readline
Suggested packages:
  php-pear
The following NEW packages will be installed:
  debsuryorg-archive-keyring php-common php8.3-cli php8.3-common php8.3-opcache php8.3-readline
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,220 kB of archives.
After this operation, 12.8 MB of additional disk space will be used.
Get:1 https://packages.sury.org/php bookworm/main armhf debsuryorg-archive-keyring all 2024.02.05+0~20240205.1+debian12~1.gbp343037 [4,412 B]
Get:2 https://packages.sury.org/php bookworm/main armhf php-common all 2:94+0~20240205.51+debian12~1.gbp6faa2e [12.9 kB]
Get:3 https://packages.sury.org/php bookworm/main armhf php8.3-common armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [653 kB]
Get:4 https://packages.sury.org/php bookworm/main armhf php8.3-opcache armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [60.4 kB]
Get:5 https://packages.sury.org/php bookworm/main armhf php8.3-readline armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [10.9 kB]
Get:6 https://packages.sury.org/php bookworm/main armhf php8.3-cli armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [1,479 kB]
Fetched 2,220 kB in 14s (164 kB/s)
Selecting previously unselected package debsuryorg-archive-keyring.
(Reading database ... 215968 files and directories currently installed.)
Preparing to unpack .../0-debsuryorg-archive-keyring_2024.02.05+0~20240205.1+debian12~1.gbp343037_all.deb ...
Unpacking debsuryorg-archive-keyring (2024.02.05+0~20240205.1+debian12~1.gbp343037) ...
Selecting previously unselected package php-common.
Preparing to unpack .../1-php-common_2%3a94+0~20240205.51+debian12~1.gbp6faa2e_all.deb ...
Unpacking php-common (2:94+0~20240205.51+debian12~1.gbp6faa2e) ...
Selecting previously unselected package php8.3-common.
Preparing to unpack .../2-php8.3-common_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-common (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Selecting previously unselected package php8.3-opcache.
Preparing to unpack .../3-php8.3-opcache_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-opcache (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Selecting previously unselected package php8.3-readline.
Preparing to unpack .../4-php8.3-readline_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-readline (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Selecting previously unselected package php8.3-cli.
Preparing to unpack .../5-php8.3-cli_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-cli (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Setting up debsuryorg-archive-keyring (2024.02.05+0~20240205.1+debian12~1.gbp343037) ...
Setting up php-common (2:94+0~20240205.51+debian12~1.gbp6faa2e) ...
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer �� /lib/systemd/system/phpsessionclean.timer.
Setting up php8.3-common (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/calendar.ini with new version

Creating config file /etc/php/8.3/mods-available/ctype.ini with new version

Creating config file /etc/php/8.3/mods-available/exif.ini with new version

Creating config file /etc/php/8.3/mods-available/fileinfo.ini with new version

Creating config file /etc/php/8.3/mods-available/ffi.ini with new version

Creating config file /etc/php/8.3/mods-available/ftp.ini with new version

Creating config file /etc/php/8.3/mods-available/gettext.ini with new version

Creating config file /etc/php/8.3/mods-available/iconv.ini with new version

Creating config file /etc/php/8.3/mods-available/pdo.ini with new version

Creating config file /etc/php/8.3/mods-available/phar.ini with new version

Creating config file /etc/php/8.3/mods-available/posix.ini with new version

Creating config file /etc/php/8.3/mods-available/shmop.ini with new version

Creating config file /etc/php/8.3/mods-available/sockets.ini with new version

Creating config file /etc/php/8.3/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/8.3/mods-available/sysvsem.ini with new version

Creating config file /etc/php/8.3/mods-available/sysvshm.ini with new version

Creating config file /etc/php/8.3/mods-available/tokenizer.ini with new version
Setting up php8.3-readline (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/readline.ini with new version
Setting up php8.3-opcache (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/opcache.ini with new version
Setting up php8.3-cli (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
update-alternatives: using /usr/bin/php8.3 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar8.3 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar8.3 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/8.3/cli/php.ini with new version
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for php8.3-cli (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

pi@RPI3B:~ $ php --version
PHP 8.3.9 (cli) (built: Jul  8 2024 10:27:02) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.9, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.9, Copyright (c), by Zend Technologies
~~~

# MySQL module for PHPインストール
下記のコマンドでインストールします。

①インストールコマンド
~~~
sudo apt install -y php8.3-mysql
~~~

②実行結果
~~~
pi@RPI3B:~ $ sudo apt install -y php8.3-mysql
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  php8.3-mysql
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 94.9 kB of archives.
After this operation, 273 kB of additional disk space will be used.
Get:1 https://packages.sury.org/php bookworm/main armhf php8.3-mysql armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [94.9 kB]
Fetched 94.9 kB in 9s (10.7 kB/s)
Selecting previously unselected package php8.3-mysql.
(Reading database ... 216160 files and directories currently installed.)
Preparing to unpack .../php8.3-mysql_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-mysql (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Setting up php8.3-mysql (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/mysqlnd.ini with new version

Creating config file /etc/php/8.3/mods-available/mysqli.ini with new version

Creating config file /etc/php/8.3/mods-available/pdo_mysql.ini with new version
Processing triggers for php8.3-cli (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
pi@RPI3B:~ $
~~~

③接続確認

# MariaDBインストール
下記のコマンドからインストールします。

①インストールコマンド
~~~
sudo apt-get install -y mariadb-client mariadb-server
or
sudo apt-get install -y mariadb-client
sudo apt-get install -y mariadb-server
~~~

②実行結果
~~~
pi@RPI3B:~ $ sudo apt-get install -y mariadb-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libconfig-inifiles-perl libdbd-mariadb-perl libdbi-perl libterm-readkey-perl mariadb-client-core
Suggested packages:
  libmldbm-perl libnet-daemon-perl libsql-statement-perl
The following NEW packages will be installed:
  libconfig-inifiles-perl libdbd-mariadb-perl libdbi-perl libterm-readkey-perl mariadb-client mariadb-client-core
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,172 kB of archives.
After this operation, 74.0 MB of additional disk space will be used.
Get:1 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libconfig-inifiles-perl all 3.000003-2 [45.9 kB]
Get:2 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libdbi-perl armhf 1.643-4 [763 kB]
Get:3 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libdbd-mariadb-perl armhf 1.22-1+b1 [86.2 kB]
Get:4 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libterm-readkey-perl armhf 2.38-2+b1 [23.4 kB]
Get:5 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-client-core armhf 1:10.11.3-1+rpi1 [751 kB]
Get:6 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-client armhf 1:10.11.3-1+rpi1 [2,502 kB]
Fetched 4,172 kB in 5s (901 kB/s)
Selecting previously unselected package libconfig-inifiles-perl.
(Reading database ... 217174 files and directories currently installed.)
Preparing to unpack .../0-libconfig-inifiles-perl_3.000003-2_all.deb ...
Unpacking libconfig-inifiles-perl (3.000003-2) ...
Selecting previously unselected package libdbi-perl:armhf.
Preparing to unpack .../1-libdbi-perl_1.643-4_armhf.deb ...
Unpacking libdbi-perl:armhf (1.643-4) ...
Selecting previously unselected package libdbd-mariadb-perl.
Preparing to unpack .../2-libdbd-mariadb-perl_1.22-1+b1_armhf.deb ...
Unpacking libdbd-mariadb-perl (1.22-1+b1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../3-libterm-readkey-perl_2.38-2+b1_armhf.deb ...
Unpacking libterm-readkey-perl (2.38-2+b1) ...
Selecting previously unselected package mariadb-client-core.
Preparing to unpack .../4-mariadb-client-core_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-client-core (1:10.11.3-1+rpi1) ...
Selecting previously unselected package mariadb-client.
Preparing to unpack .../5-mariadb-client_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-client (1:10.11.3-1+rpi1) ...
Setting up libconfig-inifiles-perl (3.000003-2) ...
Setting up mariadb-client-core (1:10.11.3-1+rpi1) ...
Setting up libterm-readkey-perl (2.38-2+b1) ...
Setting up libdbi-perl:armhf (1.643-4) ...
Setting up mariadb-client (1:10.11.3-1+rpi1) ...
Setting up libdbd-mariadb-perl (1.22-1+b1) ...
Processing triggers for man-db (2.11.2-2) ...
pi@RPI3B:~ $ sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  galera-4 gawk libcgi-fast-perl libcgi-pm-perl libfcgi-bin libfcgi-perl
  libfcgi0ldbl libhtml-template-perl libsigsegv2 mariadb-plugin-provider-bzip2
  mariadb-plugin-provider-lz4 mariadb-plugin-provider-lzma
  mariadb-plugin-provider-lzo mariadb-plugin-provider-snappy
  mariadb-server-core pv socat
Suggested packages:
  gawk-doc libipc-sharedcache-perl mailx mariadb-test doc-base
The following NEW packages will be installed:
  galera-4 gawk libcgi-fast-perl libcgi-pm-perl libfcgi-bin libfcgi-perl
  libfcgi0ldbl libhtml-template-perl libsigsegv2 mariadb-plugin-provider-bzip2
  mariadb-plugin-provider-lz4 mariadb-plugin-provider-lzma
  mariadb-plugin-provider-lzo mariadb-plugin-provider-snappy mariadb-server
  mariadb-server-core pv socat
0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.5 MB of archives.
After this operation, 96.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libsigsegv2 armhf 2.14-1 [36.6 kB]
Get:2 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf gawk armhf 1:5.2.1-2 [595 kB]
Get:3 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf galera-4 armhf 26.4.13-1 [720 kB]
Get:4 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-server-core armhf 1:10.11.3-1+rpi1 [6,270 kB]
Get:5 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf socat armhf 1.7.4.4-2+rpi1 [337 kB]
Get:6 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-server armhf 1:10.11.3-1+rpi1 [2,993 kB]
Get:7 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libcgi-pm-perl all 4.55-1 [220 kB]
Get:8 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libfcgi0ldbl armhf 2.4.2-2 [22.1 kB]
Get:9 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libfcgi-perl armhf 0.82+ds-2 [24.1 kB]
Get:10 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libcgi-fast-perl all 1:2.15-1 [12.1 kB]
Get:11 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libfcgi-bin armhf 2.4.2-2 [12.0 kB]
Get:12 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libhtml-template-perl all 2.97-2 [66.5 kB]
Get:13 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-plugin-provider-bzip2 armhf 1:10.11.3-1+rpi1 [24.5 kB]
Get:14 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-plugin-provider-lz4 armhf 1:10.11.3-1+rpi1 [24.4 kB]
Get:15 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-plugin-provider-lzma armhf 1:10.11.3-1+rpi1 [24.4 kB]
Get:16 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-plugin-provider-lzo armhf 1:10.11.3-1+rpi1 [24.4 kB]
Get:17 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf mariadb-plugin-provider-snappy armhf 1:10.11.3-1+rpi1 [24.4 kB]
Get:18 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf pv armhf 1.6.20-1 [50.7 kB]
Fetched 11.5 MB in 11s (1,064 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libsigsegv2:armhf.
(Reading database ... 217475 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.14-1_armhf.deb ...
Unpacking libsigsegv2:armhf (2.14-1) ...
Setting up libsigsegv2:armhf (2.14-1) ...
Selecting previously unselected package gawk.
(Reading database ... 217484 files and directories currently installed.)
Preparing to unpack .../00-gawk_1%3a5.2.1-2_armhf.deb ...
Unpacking gawk (1:5.2.1-2) ...
Selecting previously unselected package galera-4.
Preparing to unpack .../01-galera-4_26.4.13-1_armhf.deb ...
Unpacking galera-4 (26.4.13-1) ...
Selecting previously unselected package mariadb-server-core.
Preparing to unpack .../02-mariadb-server-core_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-server-core (1:10.11.3-1+rpi1) ...
Selecting previously unselected package socat.
Preparing to unpack .../03-socat_1.7.4.4-2+rpi1_armhf.deb ...
Unpacking socat (1.7.4.4-2+rpi1) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../04-mariadb-server_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-server (1:10.11.3-1+rpi1) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../05-libcgi-pm-perl_4.55-1_all.deb ...
Unpacking libcgi-pm-perl (4.55-1) ...
Selecting previously unselected package libfcgi0ldbl:armhf.
Preparing to unpack .../06-libfcgi0ldbl_2.4.2-2_armhf.deb ...
Unpacking libfcgi0ldbl:armhf (2.4.2-2) ...
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../07-libfcgi-perl_0.82+ds-2_armhf.deb ...
Unpacking libfcgi-perl (0.82+ds-2) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../08-libcgi-fast-perl_1%3a2.15-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.15-1) ...
Selecting previously unselected package libfcgi-bin.
Preparing to unpack .../09-libfcgi-bin_2.4.2-2_armhf.deb ...
Unpacking libfcgi-bin (2.4.2-2) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../10-libhtml-template-perl_2.97-2_all.deb ...
Unpacking libhtml-template-perl (2.97-2) ...
Selecting previously unselected package mariadb-plugin-provider-bzip2.
Preparing to unpack .../11-mariadb-plugin-provider-bzip2_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-plugin-provider-bzip2 (1:10.11.3-1+rpi1) ...
Selecting previously unselected package mariadb-plugin-provider-lz4.
Preparing to unpack .../12-mariadb-plugin-provider-lz4_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-plugin-provider-lz4 (1:10.11.3-1+rpi1) ...
Selecting previously unselected package mariadb-plugin-provider-lzma.
Preparing to unpack .../13-mariadb-plugin-provider-lzma_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-plugin-provider-lzma (1:10.11.3-1+rpi1) ...
Selecting previously unselected package mariadb-plugin-provider-lzo.
Preparing to unpack .../14-mariadb-plugin-provider-lzo_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-plugin-provider-lzo (1:10.11.3-1+rpi1) ...
Selecting previously unselected package mariadb-plugin-provider-snappy.
Preparing to unpack .../15-mariadb-plugin-provider-snappy_1%3a10.11.3-1+rpi1_armhf.deb ...
Unpacking mariadb-plugin-provider-snappy (1:10.11.3-1+rpi1) ...
Selecting previously unselected package pv.
Preparing to unpack .../16-pv_1.6.20-1_armhf.deb ...
Unpacking pv (1.6.20-1) ...
Setting up galera-4 (26.4.13-1) ...
Setting up libfcgi0ldbl:armhf (2.4.2-2) ...
Setting up gawk (1:5.2.1-2) ...
Setting up libcgi-pm-perl (4.55-1) ...
Setting up libfcgi-bin (2.4.2-2) ...
Setting up libhtml-template-perl (2.97-2) ...
Setting up socat (1.7.4.4-2+rpi1) ...
Setting up pv (1.6.20-1) ...
Setting up libfcgi-perl (0.82+ds-2) ...
Setting up mariadb-server-core (1:10.11.3-1+rpi1) ...
Setting up libcgi-fast-perl (1:2.15-1) ...
Setting up mariadb-server (1:10.11.3-1+rpi1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service �� /lib/systemd/system/mariadb.service.
Setting up mariadb-plugin-provider-bzip2 (1:10.11.3-1+rpi1) ...
Setting up mariadb-plugin-provider-lzma (1:10.11.3-1+rpi1) ...
Setting up mariadb-plugin-provider-lzo (1:10.11.3-1+rpi1) ...
Setting up mariadb-plugin-provider-lz4 (1:10.11.3-1+rpi1) ...
Setting up mariadb-plugin-provider-snappy (1:10.11.3-1+rpi1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u7) ...
Processing triggers for mariadb-server (1:10.11.3-1+rpi1) ...
Error: Timeout was reached
pi@RPI3B:~ $ sudo mariadb -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.11.3-MariaDB-1+rpi1 Raspbian 12

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> quit
Bye
~~~

# PHP関連パッケージをインストール
下記のコマンドからインストールします。

①インストールコマンド
~~~
sudo apt install -y php8.3-curl php8.3-gd php8.3-mbstring php8.3-xml php8.3-zip
~~~

②実行結果
~~~
pi@RPI3B:~ $ sudo apt install -y php8.3-curl php8.3-gd php8.3-mbstring php8.3-xml php8.3-zip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libonig5 libzip4
The following NEW packages will be installed:
  libonig5 libzip4 php8.3-curl php8.3-gd php8.3-mbstring php8.3-xml php8.3-zip
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 809 kB of archives.
After this operation, 2,362 kB of additional disk space will be used.
Get:1 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bookworm/main armhf libonig5 armhf 6.9.8-1 [166 kB]
Get:2 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf libzip4 armhf 1.7.3-1+b1 [49.8 kB]
Get:3 https://packages.sury.org/php bookworm/main armhf php8.3-curl armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [32.6 kB]
Get:4 https://packages.sury.org/php bookworm/main armhf php8.3-gd armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [24.2 kB]
Get:5 https://packages.sury.org/php bookworm/main armhf php8.3-mbstring armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [415 kB]
Get:6 https://packages.sury.org/php bookworm/main armhf php8.3-xml armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [96.3 kB]
Get:7 https://packages.sury.org/php bookworm/main armhf php8.3-zip armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [24.4 kB]
Fetched 809 kB in 13s (63.5 kB/s)
Selecting previously unselected package libonig5:armhf.
(Reading database ... 216091 files and directories currently installed.)
Preparing to unpack .../0-libonig5_6.9.8-1_armhf.deb ...
Unpacking libonig5:armhf (6.9.8-1) ...
Selecting previously unselected package libzip4:armhf.
Preparing to unpack .../1-libzip4_1.7.3-1+b1_armhf.deb ...
Unpacking libzip4:armhf (1.7.3-1+b1) ...
Selecting previously unselected package php8.3-curl.
Preparing to unpack .../2-php8.3-curl_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-curl (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Selecting previously unselected package php8.3-gd.
Preparing to unpack .../3-php8.3-gd_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-gd (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Selecting previously unselected package php8.3-mbstring.
Preparing to unpack .../4-php8.3-mbstring_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-mbstring (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Selecting previously unselected package php8.3-xml.
Preparing to unpack .../5-php8.3-xml_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-xml (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Selecting previously unselected package php8.3-zip.
Preparing to unpack .../6-php8.3-zip_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-zip (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Setting up php8.3-curl (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/curl.ini with new version
Setting up libzip4:armhf (1.7.3-1+b1) ...
Setting up php8.3-zip (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/zip.ini with new version
Setting up php8.3-xml (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/dom.ini with new version

Creating config file /etc/php/8.3/mods-available/simplexml.ini with new version

Creating config file /etc/php/8.3/mods-available/xml.ini with new version

Creating config file /etc/php/8.3/mods-available/xmlreader.ini with new version

Creating config file /etc/php/8.3/mods-available/xmlwriter.ini with new version

Creating config file /etc/php/8.3/mods-available/xsl.ini with new version
Setting up libonig5:armhf (6.9.8-1) ...
Setting up php8.3-gd (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/gd.ini with new version
Setting up php8.3-mbstring (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/mbstring.ini with new version
Processing triggers for libc-bin (2.36-9+rpt2+deb12u7) ...
Processing triggers for php8.3-cli (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
pi@RPI3B:~ $ 
~~~

# Laravel 11のexample-appを作成
下記のコマンドでバージョンを指定してプロジェクトを生成します。

①インストールコマンド
~~~
composer create-project laravel/laravel:^11.0 example-app
~~~

②実行結果
~~~
pi@RPI3B:~ $ composer create-project laravel/laravel:^11.0 example-app
Creating a "laravel/laravel:^11.0" project at "./example-app"
Installing laravel/laravel (v11.1.4)
  - Downloading laravel/laravel (v11.1.4)
  - Installing laravel/laravel (v11.1.4): Extracting archive
Created project in /home/pi/example-app
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies
Lock file operations: 107 installs, 0 updates, 0 removals
  - Locking brick/math (0.12.1)
  - Locking carbonphp/carbon-doctrine-types (3.2.0)
  - Locking dflydev/dot-access-data (v3.0.3)
  - Locking doctrine/inflector (2.0.10)
  - Locking doctrine/lexer (3.0.1)
  - Locking dragonmantank/cron-expression (v3.3.3)
  - Locking egulias/email-validator (4.0.2)
  - Locking fakerphp/faker (v1.23.1)
  - Locking filp/whoops (2.15.4)
  - Locking fruitcake/php-cors (v1.3.0)
  - Locking graham-campbell/result-type (v1.1.3)
  - Locking guzzlehttp/guzzle (7.9.2)
  - Locking guzzlehttp/promises (2.0.3)
  - Locking guzzlehttp/psr7 (2.7.0)
  - Locking guzzlehttp/uri-template (v1.0.3)
  - Locking hamcrest/hamcrest-php (v2.0.1)
  - Locking laravel/framework (v11.18.1)
  - Locking laravel/pint (v1.17.0)
  - Locking laravel/prompts (v0.1.24)
  - Locking laravel/sail (v1.31.0)
  - Locking laravel/serializable-closure (v1.3.3)
  - Locking laravel/tinker (v2.9.0)
  - Locking league/commonmark (2.5.1)
  - Locking league/config (v1.2.0)
  - Locking league/flysystem (3.28.0)
  - Locking league/flysystem-local (3.28.0)
  - Locking league/mime-type-detection (1.15.0)
  - Locking mockery/mockery (1.6.12)
  - Locking monolog/monolog (3.7.0)
  - Locking myclabs/deep-copy (1.12.0)
  - Locking nesbot/carbon (3.7.0)
  - Locking nette/schema (v1.3.0)
  - Locking nette/utils (v4.0.4)
  - Locking nikic/php-parser (v5.1.0)
  - Locking nunomaduro/collision (v8.3.0)
  - Locking nunomaduro/termwind (v2.0.1)
  - Locking phar-io/manifest (2.0.4)
  - Locking phar-io/version (3.2.1)
  - Locking phpoption/phpoption (1.9.3)
  - Locking phpunit/php-code-coverage (11.0.5)
  - Locking phpunit/php-file-iterator (5.0.1)
  - Locking phpunit/php-invoker (5.0.1)
  - Locking phpunit/php-text-template (4.0.1)
  - Locking phpunit/php-timer (7.0.1)
  - Locking phpunit/phpunit (11.2.8)
  - Locking psr/clock (1.0.0)
  - Locking psr/container (2.0.2)
  - Locking psr/event-dispatcher (1.0.0)
  - Locking psr/http-client (1.0.3)
  - Locking psr/http-factory (1.1.0)
  - Locking psr/http-message (2.0)
  - Locking psr/log (3.0.0)
  - Locking psr/simple-cache (3.0.0)
  - Locking psy/psysh (v0.12.4)
  - Locking ralouphie/getallheaders (3.0.3)
  - Locking ramsey/collection (2.0.0)
  - Locking ramsey/uuid (4.7.6)
  - Locking sebastian/cli-parser (3.0.2)
  - Locking sebastian/code-unit (3.0.1)
  - Locking sebastian/code-unit-reverse-lookup (4.0.1)
  - Locking sebastian/comparator (6.0.1)
  - Locking sebastian/complexity (4.0.1)
  - Locking sebastian/diff (6.0.2)
  - Locking sebastian/environment (7.2.0)
  - Locking sebastian/exporter (6.1.3)
  - Locking sebastian/global-state (7.0.2)
  - Locking sebastian/lines-of-code (3.0.1)
  - Locking sebastian/object-enumerator (6.0.1)
  - Locking sebastian/object-reflector (4.0.1)
  - Locking sebastian/recursion-context (6.0.2)
  - Locking sebastian/type (5.0.1)
  - Locking sebastian/version (5.0.1)
  - Locking symfony/clock (v7.1.1)
  - Locking symfony/console (v7.1.3)
  - Locking symfony/css-selector (v7.1.1)
  - Locking symfony/deprecation-contracts (v3.5.0)
  - Locking symfony/error-handler (v7.1.3)
  - Locking symfony/event-dispatcher (v7.1.1)
  - Locking symfony/event-dispatcher-contracts (v3.5.0)
  - Locking symfony/finder (v7.1.3)
  - Locking symfony/http-foundation (v7.1.3)
  - Locking symfony/http-kernel (v7.1.3)
  - Locking symfony/mailer (v7.1.2)
  - Locking symfony/mime (v7.1.2)
  - Locking symfony/polyfill-ctype (v1.30.0)
  - Locking symfony/polyfill-intl-grapheme (v1.30.0)
  - Locking symfony/polyfill-intl-idn (v1.30.0)
  - Locking symfony/polyfill-intl-normalizer (v1.30.0)
  - Locking symfony/polyfill-mbstring (v1.30.0)
  - Locking symfony/polyfill-php72 (v1.30.0)
  - Locking symfony/polyfill-php80 (v1.30.0)
  - Locking symfony/polyfill-php83 (v1.30.0)
  - Locking symfony/polyfill-uuid (v1.30.0)
  - Locking symfony/process (v7.1.3)
  - Locking symfony/routing (v7.1.3)
  - Locking symfony/service-contracts (v3.5.0)
  - Locking symfony/string (v7.1.3)
  - Locking symfony/translation (v7.1.3)
  - Locking symfony/translation-contracts (v3.5.0)
  - Locking symfony/uid (v7.1.1)
  - Locking symfony/var-dumper (v7.1.3)
  - Locking symfony/yaml (v7.1.1)
  - Locking theseer/tokenizer (1.2.3)
  - Locking tijsverkoyen/css-to-inline-styles (v2.2.7)
  - Locking vlucas/phpdotenv (v5.6.1)
  - Locking voku/portable-ascii (2.0.1)
  - Locking webmozart/assert (1.11.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 107 installs, 0 updates, 0 removals
  - Downloading doctrine/inflector (2.0.10)
  - Downloading doctrine/lexer (3.0.1)
  - Downloading symfony/polyfill-ctype (v1.30.0)
  - Downloading webmozart/assert (1.11.0)
  - Downloading dragonmantank/cron-expression (v3.3.3)
  - Downloading symfony/deprecation-contracts (v3.5.0)
  - Downloading psr/container (2.0.2)
  - Downloading fakerphp/faker (v1.23.1)
  - Downloading symfony/polyfill-php83 (v1.30.0)
  - Downloading symfony/polyfill-mbstring (v1.30.0)
  - Downloading symfony/http-foundation (v7.1.3)
  - Downloading fruitcake/php-cors (v1.3.0)
  - Downloading psr/http-message (2.0)
  - Downloading psr/http-client (1.0.3)
  - Downloading ralouphie/getallheaders (3.0.3)
  - Downloading psr/http-factory (1.1.0)
  - Downloading guzzlehttp/psr7 (2.7.0)
  - Downloading guzzlehttp/promises (2.0.3)
  - Downloading guzzlehttp/guzzle (7.9.2)
  - Downloading symfony/polyfill-php80 (v1.30.0)
  - Downloading guzzlehttp/uri-template (v1.0.3)
  - Downloading laravel/pint (v1.17.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.30.0)
  - Downloading symfony/polyfill-intl-grapheme (v1.30.0)
  - Downloading symfony/string (v7.1.3)
  - Downloading symfony/service-contracts (v3.5.0)
  - Downloading symfony/console (v7.1.3)
  - Downloading voku/portable-ascii (2.0.1)
  - Downloading phpoption/phpoption (1.9.3)
  - Downloading graham-campbell/result-type (v1.1.3)
  - Downloading vlucas/phpdotenv (v5.6.1)
  - Downloading symfony/css-selector (v7.1.1)
  - Downloading tijsverkoyen/css-to-inline-styles (v2.2.7)
  - Downloading symfony/var-dumper (v7.1.3)
  - Downloading symfony/polyfill-uuid (v1.30.0)
  - Downloading symfony/uid (v7.1.1)
  - Downloading symfony/routing (v7.1.3)
  - Downloading symfony/process (v7.1.3)
  - Downloading symfony/polyfill-php72 (v1.30.0)
  - Downloading symfony/polyfill-intl-idn (v1.30.0)
  - Downloading symfony/mime (v7.1.2)
  - Downloading psr/event-dispatcher (1.0.0)
  - Downloading symfony/event-dispatcher-contracts (v3.5.0)
  - Downloading symfony/event-dispatcher (v7.1.1)
  - Downloading psr/log (3.0.0)
  - Downloading egulias/email-validator (4.0.2)
  - Downloading symfony/mailer (v7.1.2)
  - Downloading symfony/error-handler (v7.1.3)
  - Downloading symfony/http-kernel (v7.1.3)
  - Downloading symfony/finder (v7.1.3)
  - Downloading ramsey/collection (2.0.0)
  - Downloading brick/math (0.12.1)
  - Downloading ramsey/uuid (4.7.6)
  - Downloading psr/simple-cache (3.0.0)
  - Downloading nunomaduro/termwind (v2.0.1)
  - Downloading symfony/translation-contracts (v3.5.0)
  - Downloading symfony/translation (v7.1.3)
  - Downloading psr/clock (1.0.0)
  - Downloading symfony/clock (v7.1.1)
  - Downloading carbonphp/carbon-doctrine-types (3.2.0)
  - Downloading nesbot/carbon (3.7.0)
  - Downloading monolog/monolog (3.7.0)
  - Downloading league/mime-type-detection (1.15.0)
  - Downloading league/flysystem (3.28.0)
  - Downloading league/flysystem-local (3.28.0)
  - Downloading nette/utils (v4.0.4)
  - Downloading nette/schema (v1.3.0)
  - Downloading dflydev/dot-access-data (v3.0.3)
  - Downloading league/config (v1.2.0)
  - Downloading league/commonmark (2.5.1)
  - Downloading laravel/serializable-closure (v1.3.3)
  - Downloading laravel/prompts (v0.1.24)
  - Downloading laravel/framework (v11.18.1)
  - Downloading symfony/yaml (v7.1.1)
  - Downloading laravel/sail (v1.31.0)
  - Downloading nikic/php-parser (v5.1.0)
  - Downloading psy/psysh (v0.12.4)
  - Downloading laravel/tinker (v2.9.0)
  - Downloading hamcrest/hamcrest-php (v2.0.1)
  - Downloading mockery/mockery (1.6.12)
  - Downloading filp/whoops (2.15.4)
  - Downloading nunomaduro/collision (v8.3.0)
  - Downloading sebastian/version (5.0.1)
  - Downloading sebastian/type (5.0.1)
  - Downloading sebastian/recursion-context (6.0.2)
  - Downloading sebastian/object-reflector (4.0.1)
  - Downloading sebastian/object-enumerator (6.0.1)
  - Downloading sebastian/global-state (7.0.2)
  - Downloading sebastian/exporter (6.1.3)
  - Downloading sebastian/environment (7.2.0)
  - Downloading sebastian/diff (6.0.2)
  - Downloading sebastian/comparator (6.0.1)
  - Downloading sebastian/code-unit (3.0.1)
  - Downloading sebastian/cli-parser (3.0.2)
  - Downloading phpunit/php-timer (7.0.1)
  - Downloading phpunit/php-text-template (4.0.1)
  - Downloading phpunit/php-invoker (5.0.1)
  - Downloading phpunit/php-file-iterator (5.0.1)
  - Downloading theseer/tokenizer (1.2.3)
  - Downloading sebastian/lines-of-code (3.0.1)
  - Downloading sebastian/complexity (4.0.1)
  - Downloading sebastian/code-unit-reverse-lookup (4.0.1)
  - Downloading phpunit/php-code-coverage (11.0.5)
  - Downloading phar-io/version (3.2.1)
  - Downloading phar-io/manifest (2.0.4)
  - Downloading myclabs/deep-copy (1.12.0)
  - Downloading phpunit/phpunit (11.2.8)
  - Installing doctrine/inflector (2.0.10): Extracting archive
  - Installing doctrine/lexer (3.0.1): Extracting archive
  - Installing symfony/polyfill-ctype (v1.30.0): Extracting archive
  - Installing webmozart/assert (1.11.0): Extracting archive
  - Installing dragonmantank/cron-expression (v3.3.3): Extracting archive
  - Installing symfony/deprecation-contracts (v3.5.0): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing fakerphp/faker (v1.23.1): Extracting archive
  - Installing symfony/polyfill-php83 (v1.30.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.30.0): Extracting archive
  - Installing symfony/http-foundation (v7.1.3): Extracting archive
  - Installing fruitcake/php-cors (v1.3.0): Extracting archive
  - Installing psr/http-message (2.0): Extracting archive
  - Installing psr/http-client (1.0.3): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-factory (1.1.0): Extracting archive
  - Installing guzzlehttp/psr7 (2.7.0): Extracting archive
  - Installing guzzlehttp/promises (2.0.3): Extracting archive
  - Installing guzzlehttp/guzzle (7.9.2): Extracting archive
  - Installing symfony/polyfill-php80 (v1.30.0): Extracting archive
  - Installing guzzlehttp/uri-template (v1.0.3): Extracting archive
  - Installing laravel/pint (v1.17.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.30.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.30.0): Extracting archive
  - Installing symfony/string (v7.1.3): Extracting archive
  - Installing symfony/service-contracts (v3.5.0): Extracting archive
  - Installing symfony/console (v7.1.3): Extracting archive
  - Installing voku/portable-ascii (2.0.1): Extracting archive
  - Installing phpoption/phpoption (1.9.3): Extracting archive
  - Installing graham-campbell/result-type (v1.1.3): Extracting archive
  - Installing vlucas/phpdotenv (v5.6.1): Extracting archive
  - Installing symfony/css-selector (v7.1.1): Extracting archive
  - Installing tijsverkoyen/css-to-inline-styles (v2.2.7): Extracting archive
  - Installing symfony/var-dumper (v7.1.3): Extracting archive
  - Installing symfony/polyfill-uuid (v1.30.0): Extracting archive
  - Installing symfony/uid (v7.1.1): Extracting archive
  - Installing symfony/routing (v7.1.3): Extracting archive
  - Installing symfony/process (v7.1.3): Extracting archive
  - Installing symfony/polyfill-php72 (v1.30.0): Extracting archive
  - Installing symfony/polyfill-intl-idn (v1.30.0): Extracting archive
  - Installing symfony/mime (v7.1.2): Extracting archive
  - Installing psr/event-dispatcher (1.0.0): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v3.5.0): Extracting archive
  - Installing symfony/event-dispatcher (v7.1.1): Extracting archive
  - Installing psr/log (3.0.0): Extracting archive
  - Installing egulias/email-validator (4.0.2): Extracting archive
  - Installing symfony/mailer (v7.1.2): Extracting archive
  - Installing symfony/error-handler (v7.1.3): Extracting archive
  - Installing symfony/http-kernel (v7.1.3): Extracting archive
  - Installing symfony/finder (v7.1.3): Extracting archive
  - Installing ramsey/collection (2.0.0): Extracting archive
  - Installing brick/math (0.12.1): Extracting archive
  - Installing ramsey/uuid (4.7.6): Extracting archive
  - Installing psr/simple-cache (3.0.0): Extracting archive
  - Installing nunomaduro/termwind (v2.0.1): Extracting archive
  - Installing symfony/translation-contracts (v3.5.0): Extracting archive
  - Installing symfony/translation (v7.1.3): Extracting archive
  - Installing psr/clock (1.0.0): Extracting archive
  - Installing symfony/clock (v7.1.1): Extracting archive
  - Installing carbonphp/carbon-doctrine-types (3.2.0): Extracting archive
  - Installing nesbot/carbon (3.7.0): Extracting archive
  - Installing monolog/monolog (3.7.0): Extracting archive
  - Installing league/mime-type-detection (1.15.0): Extracting archive
  - Installing league/flysystem (3.28.0): Extracting archive
  - Installing league/flysystem-local (3.28.0): Extracting archive
  - Installing nette/utils (v4.0.4): Extracting archive
  - Installing nette/schema (v1.3.0): Extracting archive
  - Installing dflydev/dot-access-data (v3.0.3): Extracting archive
  - Installing league/config (v1.2.0): Extracting archive
  - Installing league/commonmark (2.5.1): Extracting archive
  - Installing laravel/serializable-closure (v1.3.3): Extracting archive
  - Installing laravel/prompts (v0.1.24): Extracting archive
  - Installing laravel/framework (v11.18.1): Extracting archive
  - Installing symfony/yaml (v7.1.1): Extracting archive
  - Installing laravel/sail (v1.31.0): Extracting archive
  - Installing nikic/php-parser (v5.1.0): Extracting archive
  - Installing psy/psysh (v0.12.4): Extracting archive
  - Installing laravel/tinker (v2.9.0): Extracting archive
  - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
  - Installing mockery/mockery (1.6.12): Extracting archive
  - Installing filp/whoops (2.15.4): Extracting archive
  - Installing nunomaduro/collision (v8.3.0): Extracting archive
  - Installing sebastian/version (5.0.1): Extracting archive
  - Installing sebastian/type (5.0.1): Extracting archive
  - Installing sebastian/recursion-context (6.0.2): Extracting archive
  - Installing sebastian/object-reflector (4.0.1): Extracting archive
  - Installing sebastian/object-enumerator (6.0.1): Extracting archive
  - Installing sebastian/global-state (7.0.2): Extracting archive
  - Installing sebastian/exporter (6.1.3): Extracting archive
  - Installing sebastian/environment (7.2.0): Extracting archive
  - Installing sebastian/diff (6.0.2): Extracting archive
  - Installing sebastian/comparator (6.0.1): Extracting archive
  - Installing sebastian/code-unit (3.0.1): Extracting archive
  - Installing sebastian/cli-parser (3.0.2): Extracting archive
  - Installing phpunit/php-timer (7.0.1): Extracting archive
  - Installing phpunit/php-text-template (4.0.1): Extracting archive
  - Installing phpunit/php-invoker (5.0.1): Extracting archive
  - Installing phpunit/php-file-iterator (5.0.1): Extracting archive
  - Installing theseer/tokenizer (1.2.3): Extracting archive
  - Installing sebastian/lines-of-code (3.0.1): Extracting archive
  - Installing sebastian/complexity (4.0.1): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (4.0.1): Extracting archive
  - Installing phpunit/php-code-coverage (11.0.5): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.4): Extracting archive
  - Installing myclabs/deep-copy (1.12.0): Extracting archive
  - Installing phpunit/phpunit (11.2.8): Extracting archive
50 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.

  laravel/sail .......................................................... DONE
  laravel/tinker ........................................................ DONE
  nesbot/carbon ......................................................... DONE
  nunomaduro/collision .................................................. DONE
  nunomaduro/termwind ................................................... DONE

79 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi --force

   INFO  No publishable resources for tag [laravel-assets].

No security vulnerability advisories found.
> @php artisan key:generate --ansi

   INFO  Application key set successfully.

> @php -r "file_exists('database/database.sqlite') || touch('database/database.sqlite');"
> @php artisan migrate --graceful --ansi

   WARN  could not find driver (Connection: sqlite, SQL: PRAGMA foreign_keys = ON;).

pi@RPI3B:~ $
~~~

③SQLLiteドライバインストール
~~~
pi@RPI3B:~/example-app $ sudo apt-get install php8.3-sqlite3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  php8.3-sqlite3
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.0 kB of archives.
After this operation, 96.3 kB of additional disk space will be used.
Get:1 https://packages.sury.org/php bookworm/main armhf php8.3-sqlite3 armhf 8.3.9-1+0~20240708.36+debian12~1.gbp429c36 [26.0 kB]
Fetched 26.0 kB in 7s (3,586 B/s)
Selecting previously unselected package php8.3-sqlite3.
(Reading database ... 218067 files and directories currently installed.)
Preparing to unpack .../php8.3-sqlite3_8.3.9-1+0~20240708.36+debian12~1.gbp429c36_armhf.deb ...
Unpacking php8.3-sqlite3 (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Setting up php8.3-sqlite3 (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...

Creating config file /etc/php/8.3/mods-available/sqlite3.ini with new version

Creating config file /etc/php/8.3/mods-available/pdo_sqlite.ini with new version
Processing triggers for libapache2-mod-php8.3 (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Processing triggers for php8.3-cli (8.3.9-1+0~20240708.36+debian12~1.gbp429c36) ...
Error: Timeout was reached
pi@RPI3B:~/example-app $
~~~

④DB Migration実行
~~~
pi@RPI3B:~/example-app $ php artisan migrate --graceful --ansi

   INFO  Preparing database.

  Creating migration table ...................................... 59.60ms DONE

   INFO  Running migrations.

  0001_01_01_000000_create_users_table ......................... 145.94ms DONE
  0001_01_01_000001_create_cache_table .......................... 58.65ms DONE
  0001_01_01_000002_create_jobs_table .......................... 133.72ms DONE

pi@RPI3B:~/example-app $
~~~

⑤artisanコマンドからサーバを実行
~~~
pi@RPI3B:~/example-app $ php artisan serve --host 192.168.1.65

   INFO  Server running on [http://192.168.1.65:8000].

  Press Ctrl+C to stop the server

  2024-07-29 22:48:52 / ................................................ ~ 1s
  2024-07-29 22:48:54 /favicon.ico .
~~~

# Laravel example-app実行画面
下記のように画面が表示されていれば正常に環境構築は完了できました。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/162336/e80cb3e3-2bd9-ea97-24a4-64251755c9c4.png)

# 終わりに
LaravelというPHPのフレームワークです。
当時はLaravel5でしたが、いつのまに11になっています。
８月から頑張ります。