LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Fedora 12 Yum hangs (https://www.linuxquestions.org/questions/linux-software-2/fedora-12-yum-hangs-780020/)

paleogryph 01-05-2010 10:16 AM

Fedora 12 Yum hangs
 
Installed F12 a few weeks ago. Everything was working fine. Then I wanted to install perl-cpan, so when I run "yum install perl-cpan", or "yum update", it hangs on "Loaded plugins: presto, refresh-packagekit".

I've let it hang there for hours, nothing ever happens.

For the first week or so, Yum worked fine, I could manually update as I've done on other Fedora versions without any issue.

In the Gnome gui I have automatic updating disabled. As far as I can tell, yum-updatesd isn't running and isn't enabled. I wanted to update things manually for a while until I got this new box "settled in".

I know I can install cpan via other methods, but this strange behavior with Yum has me worried.

Any ideas on why Yum just hangs?

TIA

cg40oz 01-05-2010 02:37 PM

try this (as root):
yum clean all

If you are wondering what it does:
clean Is used to clean up various things which accumulate in the yum cache directory
over time. More complete details can be found in the Clean Options section
below.
CLEAN OPTIONS
The following are the ways which you can invoke yum in clean mode. Note that "all
files" in the commands below means "all files in currently enabled repositories". If
you want to also clean any (temporarily) disabled repositories you need to use
--enablerepo=â*â option.

yum clean expire-cache
Eliminate the local data saying when the metadata and mirrorlists were down-
loaded for each repo. This means yum will revalidate the cache for each repo.
next time it is used. However if the cache is still valid, nothing significant
was deleted.

yum clean packages
Eliminate any cached packages from the system. Note that packages are not
automatically deleted after they are downloaded.

yum clean headers
Eliminate all of the header files which yum uses for dependency resolution.

yum clean metadata
Eliminate all of the files which yum uses to determine the remote availability
of packages. Using this option will force yum to download all the metadata the
next time it is run.

yum clean dbcache
Eliminate the sqlite cache used for faster access to metadata. Using this
option will force yum to recreate the cache the next time it is run.

yum clean all
Runs yum clean packages and yum clean headers, yum clean metadata and yum clean
dbcache as above.

anomie 01-05-2010 02:59 PM

I ran into the same issue yesterday with yum on Fedora 12. I'll second the yum clean all advice.

PTrenholme 01-05-2010 03:45 PM

Have you tried the package-cleanup command? Look at man package-cleanup for a description of the various options. One usually starts with package-cleanup --problems to see if they're any problems, and then proceeds from there.

Note that package-cleanup is a script that uses yum so it may "hang" as well. If it's running, your disk access monitor (usually a light) should show disk activity.

If that doesn't help, download the smart package manager (by hand) from a Fedora repository and use rpm to install it. (You'll probably want to install Packagekit-smart, smart, smart-gui, and smart-update. The smart package manager is a Python program, so you'll need Python installed - which is a default installation, so that should be no problem.) Also get the fedora-package-config-smart rpm file to set up the Fedora repository access.

One nice thing about the smart program is that it does its own unpacking, so you can use it when yum is completely non-functional for some reason. I keep a copy installed just to have an alternative to yum available.

Note, however, that the default Fedora setup ignores mirror sites, so downloads are all from the central Red Hat repositories, which are often slow. If the smart developers could automate mirror site identification and usage, smart would be my choice for a "universal" package manager. (It does support all of the "major" package formats now, but its rpm package support is less developed than other formats.)

paleogryph 01-22-2010 11:13 AM

Thanks for all the suggestions.

I ran all the "yum clean" commands, and now yum actually displays errors:

http://mirror.svk.su/fedora/linux/re...ta/repomd.xml: [Errno 12] Timeout on http://mirror.svk.su/fedora/linux/releases/12/Everyt
hing/i386/os/repodata/repomd.xml: (28, '')
Trying other mirror.
http://mirror.datacenter.by/pub/fedo...ta/repomd.xml: [Errno 12] Timeout on http://mirror.datacenter.by/pub/fedora/releases
/12/Everything/i386/os/repodata/repomd.xml: (28, '')
Trying other mirror.

I get these errors over and over.

I read up on how to edit the /etc/yum/fedora.repo and fedora-update.repo files to fix this, BUT, I have no such files...

This is what I have:
drwxr-xr-x. 2 root root 4096 2009-12-19 15:22 pluginconf.d
-rw-r--r--. 1 root root 413 2009-10-16 14:44 version-groups.conf
[root@songs yum]# cd pluginconf.d/
[root@songs pluginconf.d]# ls -l
total 16
-rw-r--r--. 1 root root 17 2009-07-24 12:19 blacklist.conf
-rw-r--r--. 1 root root 611 2009-05-01 04:56 presto.conf
-rw-r--r--. 1 root root 18 2009-11-20 02:00 refresh-packagekit.conf
-rw-r--r--. 1 root root 17 2009-07-24 12:19 whiteout.conf
[root@songs pluginconf.d]#

The other interesting thing is that my /var/log/yum.log is 0 bytes.
Yet the yum.log-20100101 is 209709 bytes and shows all the updates I did just a month ago...

Where can I download the repo files from?
How can I fix the repository?

When I try "yum repolist" I get the same errors.

TIA

PTrenholme 01-22-2010 06:28 PM

First, the YUM repository files are in /etc/yum.repos.d/, which should look somewhat like this:
Code:

$ ls /etc/yum.repos.d/
adobe-linux-i386.repo        rpmfusion-free-updates.repo
fedora-rawhide.repo          rpmfusion-free-updates-testing.repo
fedora.repo                  rpmfusion-nonfree-rawhide.repo
fedora-updates.repo          rpmfusion-nonfree.repo
fedora-updates-testing.repo  rpmfusion-nonfree-updates.repo
google-chrome.repo          rpmfusion-nonfree-updates-testing.repo
rpmfusion-free-rawhide.repo  skype.repo
rpmfusion-free.repo

Second, the "timeout" error usually happens when you're trying to access a repository whilst that repository is being "refreshed" or "updated" from the master site. (Usually, Fedora posts changes to its repositories on Tuesdays and Saturdays, but that's a "usually," not an "always," and other repositories are not so regular.) Have you tried again? Repository updates can take several hours.

paleogryph 01-25-2010 02:27 PM

This is what is in my /etc/yum.repos.d:
fedora-rawhide.repo fedora.repo fedora-updates.repo fedora-updates-testing.repo

Now when I try to update with yum I get the same thing as before, it just hangs indefinitely on:
"Loaded plugins: presto, refresh-packagekit"

PTrenholme 01-25-2010 04:47 PM

Well, have you turned off the automatic update (PackageKit) settings? Fedora uses YUM to run its automatic updates, and, of course, only one YUM instance can be run at one time. so, if you've got the "PackageKit" setting to "Check for updates," any YUM you start will "hang" until the "PackageKit" YUM process finishes and releases the YUM lock.

Note: I manage the PackageKit settings via the KDE interface (KPackageKit). I think that GNOME has a similar app, perhaps just a left-click on the icon in the task bar.


All times are GMT -5. The time now is 09:13 PM.