最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

linux - How did the mysql-community-server package was found even though the repo was not installed? - Stack Overflow

programmeradmin3浏览0评论

I have installed mysql-community-release repo under my linux machine

$$ yum info installed | grep 'mysql'
Name         : mysql80-community-release
Source       : mysql80-community-release-el9-5.src.rpm
URL          : 

When I list packages under mysql80-community-release I can see sub repos as below -

$$ rpm -ql mysql80-community-release
/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023
/etc/yum.repos.d/mysql-community-debuginfo.repo
/etc/yum.repos.d/mysql-community-source.repo
/etc/yum.repos.d/mysql-community.repo

But when I list packages under /etc/yum.repos.d/mysql-community-source.repo, I get below. Is my understanding about package incorrect or I am looking for something wrong ?

$$ sudo yum install /etc/yum.repos.d/mysql-community-source.repo:
Last metadata expiration check: 0:56:40 ago on Sun Feb  9 20:22:36 2025.
No match for argument: /etc/yum.repos.d/mysql-community-source.repo:
Error: Unable to find a match: /etc/yum.repos.d/mysql-community-source.repo:

Even though when I do , I get the mysql-community-server package details.

$$ sudo yum search mysql-community-server
Last metadata expiration check: 0:58:19 ago on Sun Feb  9 20:22:36 2025.
================= Name Exactly Matched: mysql-community-server =================
mysql-community-server.x86_64 : A very fast and reliable SQL database server
===================== Name Matched: mysql-community-server =====================
mysql-community-server-debug.x86_64 : The debug version of MySQL server

I have installed mysql-community-release repo under my linux machine

$$ yum info installed | grep 'mysql'
Name         : mysql80-community-release
Source       : mysql80-community-release-el9-5.src.rpm
URL          : http://dev.mysql.com

When I list packages under mysql80-community-release I can see sub repos as below -

$$ rpm -ql mysql80-community-release
/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023
/etc/yum.repos.d/mysql-community-debuginfo.repo
/etc/yum.repos.d/mysql-community-source.repo
/etc/yum.repos.d/mysql-community.repo

But when I list packages under /etc/yum.repos.d/mysql-community-source.repo, I get below. Is my understanding about package incorrect or I am looking for something wrong ?

$$ sudo yum install /etc/yum.repos.d/mysql-community-source.repo:
Last metadata expiration check: 0:56:40 ago on Sun Feb  9 20:22:36 2025.
No match for argument: /etc/yum.repos.d/mysql-community-source.repo:
Error: Unable to find a match: /etc/yum.repos.d/mysql-community-source.repo:

Even though when I do , I get the mysql-community-server package details.

$$ sudo yum search mysql-community-server
Last metadata expiration check: 0:58:19 ago on Sun Feb  9 20:22:36 2025.
================= Name Exactly Matched: mysql-community-server =================
mysql-community-server.x86_64 : A very fast and reliable SQL database server
===================== Name Matched: mysql-community-server =====================
mysql-community-server-debug.x86_64 : The debug version of MySQL server
Share Improve this question asked 1 hour ago nadesharanadeshara 192 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The output of rpm -ql isn't a list of subrepos, but a list of files that were installed by this rpm.
Three of these files happen to be definitions of other repos (the .repo files), but that's inconsequential to the workings of rpm -ql.

The fact that sudo yum install /etc/yum.repos.d/mysql-community-source.repo errors out isn't due to a problem with the definition, it's just incorrect usage of the command. /etc/yum.repos.d/mysql-community-source.repo is a name of a file (that happens to hold repo definitions), not a name of a package. yum install takes a name of a package, and then searches for it in all the repos defined in .repo files under /etc/yum.repos.d.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论