最後に:CentOSをアップグレードした後、コマンドが見つかりません。

最後に:CentOSをアップグレードした後、コマンドが見つかりません。

CentOSを7から8にアップグレードしました。注文はありませんlast

$ which last
/usr/bin/which: no last in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

インストールにlast失敗しましたdnf install

$ dnf install last
Repository epel is listed more than once in the configuration
EPEL for redhat/centos 8 - x86_64                                                                                           0.0  B/s |   0  B     00:00    
Failed to synchronize cache for repo 'epel', ignoring this repo.
Last metadata expiration check: 20:42:39 ago on Sun 11 Apr 2021 05:40:02 PM CST.
No match for argument: last
Error: Unable to find a match: last

lastツールをインストールする方法は?

ベストアンサー1

last別個のパッケージではなく、パッケージに提供される命令は次のとおりですutil-linux

このコマンドがインストールされているRHEL / CentOS 8システムではlast

# rpm -qf /usr/bin/last
util-linux-2.32.1-24.el8.x86_64

# dnf provides /usr/bin/last
util-linux-2.32.1-24.el8.x86_64 : A collection of basic system utilities
Repo        : @System
Matched from:
Filename    : /usr/bin/last

util-linuxパッケージのコンテンツのリストはここで見ることができます:https://centos.pkgs.org/8/centos-baseos-x86_64/util-linux-2.32.1-24.el8.x86_64.rpm.html

パッケージのアップグレードがutil-linux実際に失敗した場合、システムにいくつかの非常に基本的なシステムコマンドといくつかのPAM設定がありません。アップグレード後に再起動しなかった場合は、再起動する前にシステムに欠落しているパッケージがあることを確認してください。

dnf install @minimal-environment必要なすべてのシステムパッケージがあることを確認できます。最小CentOS 8のインストールに必要なパッケージがない場合は、実際には何もインストールせずにコマンドを終了する必要があります。

完全に再インストールするだけでなく、CentOSを7から8にアップグレードする「正式な」手順はないようです。利用可能なすべてのアップグレード手順は第三者によって設計されており、すべての可能な場合に動作が保証されるわけではありません。

おすすめ記事