Module yaml error: Unexpected key in data: static_context [line 9 col 3]

2,580次阅读
没有评论

共计 3118 个字符,预计需要花费 8 分钟才能阅读完成。

Centos 8 安装特定软件的时候报错,操作及报错如下:

[root@proxyserver yum.repos.d]# yum install epel-release
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:04:27 ago on Wed Aug 31 14:32:18 2022.
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 epel-release-8-17.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!

解决方案
可以通过升级 libmodulemd 解决。该问题已在 libmodulemd-2.13.0-1.fc33 中修复。

[root@proxyserver yum.repos.d]# dnf upgrade libmodulemd
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:05:08 ago on Wed Aug 31 14:32:18 2022.
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]
Dependencies resolved.
==================================================================================================================================================================================
 Package                                      Architecture                            Version                                         Repository                             Size
==================================================================================================================================================================================
Upgrading:
 libmodulemd                                  x86_64                                  2.13.0-1.el8                                    base                                  233 k

Transaction Summary
==================================================================================================================================================================================
Upgrade  1 Package

Total download size: 233 k
Is this ok [y/N]: y
Downloading Packages:
libmodulemd-2.13.0-1.el8.x86_64.rpm                                                                                                               232 kB/s | 233 kB     00:01
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                             232 kB/s | 233 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                          1/1
  Upgrading        : libmodulemd-2.13.0-1.el8.x86_64                                                                                                                          1/2
  Cleanup          : libmodulemd-2.9.4-2.el8.x86_64                                                                                                                           2/2
  Running scriptlet: libmodulemd-2.9.4-2.el8.x86_64                                                                                                                           2/2
  Verifying        : libmodulemd-2.13.0-1.el8.x86_64                                                                                                                          1/2
  Verifying        : libmodulemd-2.9.4-2.el8.x86_64                                                                                                                           2/2
Installed products updated.

Upgraded:
  libmodulemd-2.13.0-1.el8.x86_64

Complete!

确认操作结果:

[root@proxyserver yum.repos.d]# yum install epel-release
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:05:16 ago on Wed Aug 31 14:32:18 2022.
Package epel-release-8-17.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
正文完
 0
评论(没有评论)