Yum doesn't see Packages from local repo (DVD)

Issues related to applications and software problems
Post Reply
Benik3
Posts: 6
Joined: 2019/04/10 13:38:56

Yum doesn't see Packages from local repo (DVD)

Post by Benik3 » 2019/04/10 13:50:55

Hello there.

I'm new to CentOS and I have a problem for which I didn't find any solution.
I installed successfully CentOS on Hyper-V virtual machine. Now I want to try to install packages from local repo (from the installation DVD).
I used this guide for creating local repo: https://www.tecmint.com/install-gui-in-rhel-centos-7/
I made the dir, mounted the DVD to it (I can see files in the folder), I made the local.repo config (and even tried CentOS-Media.repo), but still yum repolist all show enabled: 0.
Any idea? :(

Thank you very much
Attachments
centos.PNG
centos.PNG (25.36 KiB) Viewed 1067 times

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Yum doesn't see Packages from local repo (DVD)

Post by TrevorH » 2019/04/10 15:01:00

Show us /etc/yum.repos.d/local.repo (or whatever you called it). Both its contents and its permissions. Also show the stanzas from /etc/yum.repos.d/CentOS-Base.repo for [base] and [updates].
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Benik3
Posts: 6
Joined: 2019/04/10 13:38:56

Re: Yum doesn't see Packages from local repo (DVD)

Post by Benik3 » 2019/04/10 21:34:33

Hello.
For some reason two attached pictures get lost.
Anyway I found now the cause - problem is that I didn't disable the internet repo and I expected, that it will simply continue to check the next repo :D
So after using

Code: Select all

yum --disablerepo=* --enablerepo=local
it works.
Well another experience for me and maybe someone will find it useful in future :)

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Yum doesn't see Packages from local repo (DVD)

Post by TrevorH » 2019/04/10 23:00:20

And that only worked because you had no files in your working directory ;-) To be sure, you need to escape the * or bash will expand it before it invokes the command - i.e. --disablerepo=\*
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Benik3
Posts: 6
Joined: 2019/04/10 13:38:56

Re: Yum doesn't see Packages from local repo (DVD)

Post by Benik3 » 2019/04/11 06:47:40

I see, thanks :)

Post Reply