3

I have installed CentOS. I want to remove bzip2, so I enter this command in the shell:

yum remove bzip2 bzip2-libs

Then nearly 500 packages were removed and I can't enter any command. For example:

ls 
-bash: /bin/ls no such file or directory

How can I re-install the lost packages?

4
  • 11
    .... facepalm Jul 5, 2012 at 5:58
  • 5
    and you were not warned about so many pacages were to be uninstalled? bzip2 is needed by very many other packages, so I don't see a point in uninstalling it...
    – glglgl
    Jul 5, 2012 at 5:59
  • 6
    it staggers the mind that you ever thought removing bzip2 was necessary, the program is like 30k?
    – SpliFF
    Jul 5, 2012 at 6:03
  • I really want to favorite this one, but I'm afraid I'd be accused of Schadenfreude. Woe the dilemma!
    – lornix
    Jul 6, 2012 at 0:38

2 Answers 2

9

Trying to recover the system will probably take you several hours. I recommend just reinstalling.

5
  • +1, when I ran an indirect dependency check on my system it just kept on scrolling my terminal which means that removing bzip2 is about the most effective way to uninstall a ton of packages. Figuring out all the packages that were removed in the process, as well as getting them all back, is probably non-feasible. Maybe a log still mentions all their names, but then still, I support reinstalling... Jul 5, 2012 at 8:46
  • 3
    forget the fork bomb!!! just uninstall bzip2.... CRASH! Mwahahah!!
    – lornix
    Jul 5, 2012 at 8:47
  • @lornix: It's the new rm -rf, I think unmerging things from the system profile should also be preserved unless --no-preserve-root is passed to the package manager. Jul 5, 2012 at 8:58
  • have to introduce the -i-know-what-im-doing-honest-really-i-do-let-me-do-this-shuddup option... just to be sure.
    – lornix
    Jul 5, 2012 at 9:00
  • @lornix: when you try to do something like that in the aptitude (text) UI, then a dialog pops up, asking you to enter the exact phrase "Yes, I am aware this is a very bad idea" before continuing ;-) Jul 5, 2012 at 11:42
1

It is a part of coreutils. Install that

8
  • 1
    hopefully yum itself is still present...
    – glglgl
    Jul 5, 2012 at 5:58
  • @glglgl: python needs bzip2-libs. yum needs python. Jul 5, 2012 at 5:59
  • @IgnacioVazquez-Abrams Badabam. SO a fresh install will probably be pending...
    – glglgl
    Jul 5, 2012 at 5:59
  • 1
    no!!!! honestly when I try to install coreutils server said /usr/bin/yum: no such file or direcotory
    – babak6
    Jul 5, 2012 at 6:00
  • 1
    @glglgl: Even better, rpm-libs also needs bzip2-libs. Fun times ahead! Jul 5, 2012 at 6:01

You must log in to answer this question.