これなに
asdfをつかった phpのインストールで、ffiを利用するためのナレッジ
asdfで phpをインストールする時に追加でパッケージを指定したい場合は、'$PHP_CONFIGURE_OPTIONS' 環境変数を利用することで追加することが出来る
また、以下エラーになることがあるので、--with-openssl
を一緒にいれるとよい
You may want to add: /home/yoshioka/.asdf/installs/php/8.3.7/lib/php to your php.ini include_path Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1 Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1 Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1 Warning: copy(https://getcomposer.org/installer): Failed to open stream: No such file or directory in Command line code on line 1 Warning: hash_file(composer-setup.php): Failed to open stream: No such file or directory in Command line code on line 1 Installer corrupt Warning: unlink(composer-setup.php): No such file or directory in Command line code on line 1 Could not open input file: composer-setup.php
❯ PHP_CONFIGURE_OPTIONS='--with-ffi --with-openssl' asdf install php 8.3.7~~ Wrote PEAR system config file at: /home/yoshioka/.asdf/installs/php/8.3.7/pear.conf You may want to add: /home/yoshioka/.asdf/installs/php/8.3.7/lib/php to your php.ini include_path Installer verified All settings correct for using Composer Downloading... Composer (version 2.7.7) successfully installed to: /home/yoshioka/.asdf/installs/php/8.3.7/bin/composer Use it: php /home/yoshioka/.asdf/installs/php/8.3.7/bin/composer ~ on ☁️ (ap-northeast-1)❯ asdf global php 8.3.7 ~ on ☁️ (ap-northeast-1)❯ php -v PHP 8.3.7(cli)(built: Jul 142024 14:42:22)(NTS) Copyright (c) The PHP Group Zend Engine v4.3.7, Copyright (c) Zend Technologies
install 完了