0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

dnfで特定のバージョンのパッケージをインストールする

Posted at

目的

almalinuxを用いるとき、パッケージ管理ソフトはyumかdnfを用いると思う。今回はdnfを用いた時に特定のバージョンのパッケージをインストールする方法を解説する。

想定

phpをインストールする時はdefaultでversion7.2がインストールされてしまう。この時、8.0をインストールしたい。

確認

まずは、インストール出来るパッケージのリストを確認する。

dnf module list php
 
 AlmaLinux 8 - AppStream
 Name    Stream      Profiles                        Summary                                                  
 php     7.2 [d]     common [d], devel, minimal      PHP scripting language                                   
 php     7.3         common [d], devel, minimal      PHP scripting language                                   
 php     7.4         common [d], devel, minimal      PHP scripting language                                   
 php     8.0          

[d]が付いている所は、defaultでインストールされる。

設定

以下の設定をいれる

dnf -y module reset php && dnf -y module enable php:8.0

インストール

dnf -y install php
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?