21 Jul

4 Ways To Fix PYCURL ERROR 22 – “The requested URL returned error: 404 Not Found”

Oliver Krautscheid Oct 17, 2014
0 2948

The other day I wrote an article on how to fix PYCURL error 7 , but there’s another more annoying error Pycurl error 22, let’s fix that

Short Solution: Disable Yum Addons

Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again

Looks like I did not pay attention the other day when I tried to fix Pycurl error 7 and downloaded an outdated CentOS-Base.repo for CentOS4, which is giving me the exact issue above. CentOS 6 apparently does no longer support the “addons” repo.

yum --disablerepo=addons update

If that doesn not work, fetch the latest CentOS-Base.repo from github rather than centos.org. The URL is https://github.com/dayne/yum/blob/master/centos6/CentOS-Base.repo

1 Upgrade CentOS Version

As mentioned before, yum has a lot of hiccups and is rather unrealiable if you misconfigured it.

The first thing you should know is that CentOS devs dont support old CentOS versions like 6.4 – you may have to upgrade your CentOS version if you are on this distribution.

You can find more information on checking your CentOS version here.

However, it is more likely a problem with yum.

2 Clean Yum

Next, we can try to clean yum to see if that fixes our problem:

yum clean all

You should get a response: Cleaning up Everything

If that doesn’t fix your problem right away, let us run a few more commands that will make sure you have a clean and up to date version of yum:

yum check 
yum upgrade

One command that I only recommend using if you know what you are doing will remove the firewall afp. It is better to install the csf firewall – if you are capable of doing that, run the following command after installing csf:

yum erase apf

3 Check Your Yum Repository Folder

Lastly, we can check the yum folder again:

cd /etc/yum.repos.d

Once in there enter dir to see whats in the folder. If you see any custom repositories without a leading CentOS, they may be custom repositories such as Atomicorp’s package, EPEL or your webhost may have put them there. In that case, a misconfigured repo will cause conflicts with your default “Base” repository and cause the error The requested URL returned error: 404 Not Found.

When you look at http://mirror.centos.org/centos/6/ – you will see that CentOS does not provide an addons folder, so you need to verify that the repos in that directory do not link to that specific URL that is simply outdated (leftover from previous CentOS versions).

4 Alternative Solution: Install EPEL

There are many other open-source repositories that you can install to get your packages. EPEL is only one of them, give it a try.

Read our guide: Installing Epel Repo on CentOS 6

About Us

Webmaster .Net is your all-in-one resource for blogging tips, system administration guides, industry news and a growing community of webmasters.

Can't find something or want to tip us?Contact@webmaster.net

Bulls and Bears
Webmaster Tutorials, Wordpress
0 shares665 views

WordPress SQL Query: Select And Delete Posts Between Two Dates

Oliver Krautscheid - Apr 08, 2017

If you are wondering how to delete posts for a certain date, you will need to know how Wordpress stores…

Advertising and Ad Networks, Copywriting
0 shares810 views

15 Tips For Increasing Facebook Ads CTR – Full Guide [2017 Update]

Cam Connor - Mar 30, 2017

In this article, we'll talk a lot about how you can write quality text ads on Facebook Ads to get…

Webmaster Tutorials
0 shares1528 views

10 Steps To Configure Nginx For WordPress, Drop Varnish And Cut Your CPU Load By 50%

Oliver Krautscheid - Oct 10, 2016

Are you using Varnish on your Wordpress blog? Possibly the Varnish script by Unixy? Great! Get rid off it. Here's…

Follow Us And get latest news

© 2016 Webmaster.Net - Property of Peakstone Media Ltd. - All rights reserved. | Privacy Policy | DMCA | Contact Us | Advertise