centoscentos7yumrepo

CentOS 7 All yum.d.repos deleted


I have googled and tried all the solutions I can find to this. An admin somehow broke yum trying to install an mssql package by adding the repo, then tried different way to fix, as did I. I deleted all repos and need to start over. Different Stack solutions have suggested trying

rpm -Uvh --force http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
curl: (22) The requested URL returned error: 404 Not Found
rpm -Uvh --force http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
curl: (22) The requested URL returned error: 404 Not Found
rpm -iv --replacepkgs http://vault.centos.org/7.3.10/BaseOS/x86_64/os/Packages/centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm
curl: (22) The requested URL returned error: 404 Not Found

I also copied and pasted yum.repos.d from another CentOS 7, but not exactly same version. It was 3.10.0-1062.18.1.el7.x86_64 and this one is 3.10.0-1160.88.1

None of this has worked and I am at my wits end. From what I have gleaned so far, I need an rpm named centos-release-7.3.10.1160.88.1.el7.centos.x86_64.rpm to replace the repos correctly but cannot find one.

Can anyone help?


Solution

  • You seem to be conflating the centos release (e.g. 7.3), and the kernel version, 3.10.x.y.z, and also concatenating these with overlap into the nonexistent "7.3.10.1160.88" version number, which you must have simply made up yourself, as it copies random parts, replaces dashes with dots, leaves out the last number.

    Your kernel version indicates that it was from centos 7.7 updates: https://vault.centos.org/7.7.1908/updates/x86_64/Packages/

    Your options are to pick one from the latest release 7.9 and just update

    http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm
    

    or pick the vaulted 7.7

    https://vault.centos.org/7.7.1908/os/x86_64/Packages/centos-release-7-7.1908.0.el7.centos.x86_64.rpm
    

    You can literally just browse these repos in the browser and view what packages they have. No need to guess.