Thursday, June 04, 2009

Fedora 11: yum hangs on 'Setting up Package Sacks'

NOTE: this post was originally written after seeing this problem in rawhide. The problem persisted into Fedora 11, but all the notes below are for a rawhide configuration. The fix below works for the fedora.repo also.

If you are trying Fedora 11 and yum hangs showing the following output:
# yum -v update
Config time: 0.045
Yum Version: 3.2.22
Setting up Package Sacks
Do not fear. There are (at least) two reasons why you can see this issue. First, the problem may just be an intersection between your proxy's configuration and the default yum configuration. If you are behind a proxy, just edit the file /etc/yum.repos.d/fedora-rawhide.repo and change the default "mirrorlist" entry to use http instead of https as follows:
Of course, you will need to leave the "arch" as x86_64 if you are installing on a 64bit machine. The default https that fedora has chosen will not work with many "transparent" proxy setups, so just change it to http, and you should be fine.

Note, all this assumes that you set up your proxy as follows:
# export http_proxy=
And when you do run a yum update, run it like this:
yum -v --enablerepo=rawhide update
Alternatively you can edit the /etc/yum.conf file and add a line like this
Which brings us to the second easy way to get yourself stuck staring at 'Setting up Package Sacks'. This came up when folks were updating Fedora 11 - preview ... that is, do not run it simply as "yum update" like I did, because it will look as though it does the update just fine, but it will break yum. Doing a simple "yum update" without enabling rawhide will enable the base fedora.repo and the fedora-updates.repo, which will also cause yum to hang at 'Setting up Package Sacks' again with the new "https" in the newly updated "fedora.repo".

Then again, you may enjoy having some extra time while you stare at yum hanging at 'Setting up Package Sacks' until it times out, I sure did ... it gave me enough time to write the following rant.

Remember ... this was the Fedora 11 preview, so you do not want to enable the normal repositories. This is a "feature bug" in my opinion. Doing an update should not change my enabled repositories without prompting me first. I say this is a bug because I have used Debian (sid) for years, and I have been using Redhat/Fedora for just as long, but I have never had this problem with Debian. Flame away.

Hope that helps.

UPDATE: Although this blog entry was for "Fedora 11 - preview" the solutions suggested here, as the anonymous comment below suggests, may also apply to Fedora 11 which has now been released.


Anonymous said...

I updated all the repos and removed the s from every https and it works now. This was in a Fedora 11 final release. The https doesn't work behind the proxy.

Anonymous said...

Seems, "https switch to http" thing works when YUM is directed to proxy via http_proxy environment variable (i.e. you add export http_proxy="http://someshithere:someport")

But if "proxy" statement in yum.conf is setted, then yum works WITHOUT changing repo files.

As you, may be, remember, in older yum versions there was problems with proxy statenemnt in yum.conf.
Details could be found on google or RH`s bugzilla

So, seems, there are own methods made for yum to work with proxies?

Naif said...

Thanks for the great tips.

i didn't enable rawhide repo, i just set up the http_proxy and removed the s from https in fedora and fedora-updates repos.
and all worked like a charm.

no need to enable or update rawhide as it's used for developers updates and stuff.

Thanks again

Praveen Kumar said...

thank you very much you save my lot of time . thnx again

Shobhit Jindal said...


Anonymous said...

Just like drbao said

I added the following line* in


and then yum worked.

*Replace the values according to your proxy server

Anonymous said...

I wish I'd found this post yesterday! ;))

Anonymous said...

I updated from FC10 to FC11 and yum stopped working. Very frustrating! Changing https to http did the trick for me! This blog was very helpful... Thanks!

Anonymous said...

Really good. Than you very much for your valuable post.

Fellipe said...

Thanks for the help.
In my case I had to edit all fedora.repo and I dont know why you told to use rawhide option as it can be dangerous.
I posted in my blog a similar solution

Vernon Singleton said...


Thanks for the post! I re-read this and added the note at the top. I hope that make it more clear why this post refers to fedora-rawhide.

Patrick said...

This problem is persistent even when you don't use a proxy and have https enabled. I used strace and found out that yum tries to connect to an IPV6 server when ipv6 is enabled but you only have an IPV4 address assigned.

I created a bug report for this

Ron said...

@Patrick, Thanks!

Removing the ipv6 line from my /etc/hosts fixed it for me.

ishu said...

thanks a bunch. changing https to http worked for me.

Anonymous said...

hey thanks so much ...