Configure Local Yum repos - Error getting repository data for, repository not found

@KodeKloud @player001 I’m getting " Error getting repository data for, repository not found" while trying to install vim-enhanced from local yum repo. I tried the following

cd /etc/yum.repos.d
sudo vi local_yum.repo

[local_yum]
name=local_yum
baseurl=file:///packages/downloaded_rpms
gpgcheck=0
enabled=1

sudo yum clean all
sudo yum repolist -> I could see the local repo listed as per requirement

sudo yum install --disablerepo="*" --enablerepo=“localyum” vim-enhanced

Gets the error.

Then removed repodata from the folder /packages/downloaded_rpms/
sudo rm -rf repodata

sudo createrepo -v /packages/downloaded_rpms/

sudo yum clean all
sudo yum repolist -> I could see the local repo listed as per requirement

sudo yum install --disablerepo="*" --enablerepo=“localyum” vim-enhanced

Still gets the same error and my Task failed. I had successfully installed vim-enhanced using below command, but I understand ie not the requirement.

sudo yum install vim-enhanced

Hello, @deepu7
Please check your configured repo name and what you wrote in the command line repo name.

@player001, it gives the same error even after correcting the same.

image

But install is successful if i use the command: sudo yum install wget and also installs the same available in the yum repo.

image

Correct the double quotes of “local_yum”

1 Like