CentOS 8.X installation software error No available modular metadata for modular package
Problem Description
We can only install software in a purely intranet (not interoperable with the public network) environment due to many restrictions in the deployment environment, so we need to download the package and install it locally on the server.
The system version is CentOS 8.2, and after using the createrepo
command to create the repodata, we get an Error: No available modular metadata for modular package
error when installing some software, as shown below.
To solve the above problem, you need to install software such as modulemd-tools to generate modular metadata. so you can do it under a server with the same system version with network, and finally upload the generated repo package directory to this server in a packaged and compressed way, and finally configure the repo source.
Install the modular metadata generation tool
Install the dependencies
$ sudo dnf install gcc gcc-c++ python3 python3-devel python3-createrepo_c python3-libdnf python3-libmodulemd libmodulemd |
Download the modulemd-tools source package and install it
$ git clone https://github.com/rpm-software-management/modulemd-tools.git |
Create repodata and modular metadata
## Go to the packages directory |
After the above step is completed, a file with the suffix -modules.yaml.gz
will be created in the repodata directory.
At this point, the package will be installed properly when you do it again.
Reference