解決 CentOS 8.x Module yaml error: Unexpected key in data: static_context [line 9 col 3] No match for argument: install 的問題
當使用 dnf 安裝的時候, 遇到如下的錯誤:
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:17:10 ago on Tue 29 Nov 2022 10:45:57 AM +08.
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Package libmodulemd-2.9.4-2.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
這是由於 libmodulemd 版本的問題 (8.3 使用 2.9), 因此要升級到最新版, 如 2.13
解決辦法如下:
dnf install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/libmodulemd-2.13.0-1.el8.x86_64.rpm -y
再運行一次 dnf 問題既解決
留言
張貼留言