YUM: Cannot find a valid baseurl

Discussion in 'Installation/Configuration' started by marvinh, Oct 1, 2011.

  1. marvinh

    marvinh New Member

    Good afternoon all,

    Suddenly YUM stopped working last night. I tried this morning again, but still not working... I receive the following error:

    [root@server01 yum.repos.d]# yum update
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    YumRepo Error: All mirror URLs are not using ftp, http or file.
    Eg. </html>/
    removing mirrorlist with no valid mirrors: /var/cache/yum/addons/mirrorlist.txt
    Error: Cannot find a valid baseurl for repo: addons

    How to solve this, already tried many solutions on the internet...

    Thanks...





    Content of CentOS-Base.repo:

    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client. You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the
    # remarked out baseurl= line instead.
    #
    #

    [base]
    name=CentOS-$releasever - Base
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    #baseurl=http://centos.mirror.transip.nl/5.7/os/x86_64/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #released updates
    [updates]
    name=CentOS-$releasever - Updates
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    #baseurl=http://centos.mirror.transip.nl/5.7/updates/x86_64/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #packages used/produced in the build but not released
    [addons]
    name=CentOS-$releasever - Addons
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
    #baseurl=http://centos.mirror.transip.nl/5.7/addons/x86_64
    gpgcheck=1
    #enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    #baseurl=http://centos.mirror.transip.nl/5.7/extras/x86_64/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
    #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
     
  2. falko

    falko Super Moderator

    Not sure why it is not working, but you can disable that repo:

    Code:
    #packages used/produced in the build but not released
    [addons]
    name=CentOS-$releasever - Addons
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
    #baseurl=http://centos.mirror.transip.nl/5.7/addons/x86_64
    gpgcheck=1
    [COLOR="Red"]enabled=0[/COLOR]
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
     
  3. marvinh

    marvinh New Member

    Already tried that one, then it says

    YumRepo Error: All mirror URLs are not using ftp, http or file.
    Eg. </html>/
    removing mirrorlist with no valid mirrors: /var/cache/yum/addons/mirrorlist.txt
    Error: Cannot find a valid baseurl for repo: base
     
  4. falko

    falko Super Moderator

    Can you check if your Internet connection is working and that you have valid nameservers in /etc/resolv.conf?

    Does
    Code:
    ping -c4 google.com
    work?
     
  5. marvinh

    marvinh New Member

    Yeah my resolv is working... having internet and can downoad stuff with Wget
     
  6. falko

    falko Super Moderator

    Not sure what's going on there. Can you try and uncomment the baseurl lines?
     
  7. marvinh

    marvinh New Member

    Indeed also tried that, like http://centos.mirror.transip.nl/5.7/addons/x86_64
    but then receiving error that it cannot find the repomd.xml in http://http://centos.mirror.transip.nl/5.7/addons/x86_64/repodata/repomd.xml

    Strange thing is that if i do a Wget it downloads the XML???

    I desided to stop with Centos, because this system has more strange behaviors, so installed debian with ISPconfig. Webserver is way more faster then it was on Centos... so problem is sort of solved :)
     

Share This Page