Apt to the rescue

So while upgrading python from a limited local repository I broke yum

  1. [root@NTC-BASE-2 ~]# yum -y install foo
  2. Traceback (most recent call last):
  3. File "/usr/bin/yum", line 28, in ?
  4. import yummain
  5. ImportError: No module named yummain
  6. <code>
  7.  
  8. However apt was still working
  9. <code>
  10. [root@NTC-BASE-2 ~]# rpm -e yum
  11. [root@NTC-BASE-2 sources.list.d]# apt-get update
  12. STUFF CUT
  13. Fetched 3980kB in 8s (478kB/s)
  14. Reading Package Lists... Done
  15. Building Dependency Tree... Done
  16. [root@NTC-BASE-2 sources.list.d]# apt-get install yum
  17. Reading Package Lists... Done
  18. Building Dependency Tree... Done
  19. The following extra packages will be installed:
  20. yum-metadata-parser
  21. The following NEW packages will be installed:
  22. yum yum-metadata-parser
  23. 0 upgraded, 2 newly installed, 0 removed and 234 not upgraded.
  24. Need to get 419kB of archives.
  25. After unpacking 1412kB of additional disk space will be used.
  26. Do you want to continue? [Y/n] y
  27. Get:1 <a href="http://mirror.centos.org" title="http://mirror.centos.org">http://mirror.centos.org</a> centos/4/apt/i386/os yum-metadata-parser 1.0-8.el4.centos [24.0kB]
  28. Get:2 <a href="http://mirror.centos.org" title="http://mirror.centos.org">http://mirror.centos.org</a> centos/4/apt/i386/os yum 2.4.3-4.el4.centos [395kB]
  29. Fetched 419kB in 1s (417kB/s)
  30. Committing changes...
  31. Preparing... ########################################### [100%]
  32. 1:yum-metadata-parser ########################################### [ 50%]
  33. 2:yum ########################################### [100%]
  34. Done.
  35. [root@NTC-BASE-2 sources.list.d]# y
  36. [root@NTC-BASE-2 sources.list.d]# yum update
  37. Setting up Update Process
  38. Setting up repositories

Back in business :)

Good idea Raskas :)

Tags:

Comments

Bart Verwilst's picture

#1 Bart Verwilst : Or..

You can just stop at step 1 and live a happy yumless life ;)