Cannot find valid baseurl for repo: epel

General support questions
Post Reply
TDUBS
Posts: 2
Joined: 2013/06/15 12:39:50
Contact:

Cannot find valid baseurl for repo: epel

Post by TDUBS » 2013/06/15 12:46:33

Hi,

I was trying to upgrade PHP 5.3.x to 5.4.x and for some reason I came across that error. Now, whenever I try running yum install for anything, that comes up. Is there a way to fix it without removing Apache, MySQL, etc?

[img align=left]http://puu.sh/3gdsJ.png[/img]



Thanks!

User avatar
TrevorH
Forum Moderator
Posts: 24342
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Cannot find valid baseurl for repo: epel

Post by TrevorH » 2013/06/15 13:02:25

Edit the file /etc/yum.repos.d/epel.repo and check that it has one or other of baseurl= or mirrorlist= specified. Looks like you commented one out and the other was already commented (only one can be present).

TDUBS
Posts: 2
Joined: 2013/06/15 12:39:50
Contact:

Re: Cannot find valid baseurl for repo: epel

Post by TDUBS » 2013/06/15 13:11:07

[quote]
TrevorH wrote:
Edit the file /etc/yum.repos.d/epel.repo and check that it has one or other of baseurl= or mirrorlist= specified. Looks like you commented one out and the other was already commented (only one can be present).[/quote]

Is there a way I can get rid of this entirely? I'm not familiar with CentOS really.

User avatar
TrevorH
Forum Moderator
Posts: 24342
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot find valid baseurl for repo: epel

Post by TrevorH » 2013/06/15 20:12:31

Well, many people find the EPEL repository quite useful so I'm not entirely sure you [u]want[/u] to remove it. It contains Extra Packages for Enterprise Linux and has many things in it that are not in the CentOS supplied repos. But if you want to remove it then just run

[code]
rpm -e epel-release
[/code]

Once that's done, just check if /etc/yum.repos.d/epel.repo has gone and if not then rename or delete it.

If you want to fix it instead then the epel.repo file should contain two lines in the first stanza that say

[code]
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
[/code]

Post Reply