⚠️

[almalinux9 + laravel] sodiumがなくて怒られる

2024/03/05に公開

JP

composer updateができない!!

composer updateができず、エラー分を見るとsodiumがねぇと言われる。
laravel-passportが入らない。まずい。

記事発見。試行。解決

下記記事参照。
Qiita

以下コマンド叩く。

# 作業用ディレクトリの作成
$ cd ~/usr/local
$ mkdir src

# libsodium のダウンロードとコンパイル
$ cd src
$ wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz
$ tar xzvf libsodium-1.0.18.tar.gz
$ cd libsodium-1.0.18
$ ./configure
$ make
$ make install

解決。

$ php -i | grep sodium
sodium

ちなみに、//etc/php.ini でextension=sodiumのコメントアウトを外すことで解決したという記事もあったが、多分別のインストール方法使用している、と思う。


EN

we can not "composer update"

we have an error in "composer update" command.
then we could not install "laravel-passport."

i found the Article

refer to this article↓
Qiita
(written by japanese)

try to this↓

# make a working directory
$ cd ~/usr/local
$ mkdir src

# Download & Compile of "libsodium" 
$ cd src
$ wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz
$ tar xzvf libsodium-1.0.18.tar.gz
$ cd libsodium-1.0.18
$ ./configure
$ make
$ make install

Resolve it.

$ php -i | grep sodium
sodium

By the way, someone says Effective remove comment-out of "extension=sodium" in //etc/php.ini but this way through other install methods Maybe.

Discussion