Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25
Hi everyone. Today I have struggled with Nagios installation. After a long while I decided to reinstall some stuff and start from the beginning because nothing worked. Then ingeniously I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2013
    Posts
    4

    Accidently deleted gcc glibc glibc-common openssl etc.


    Hi everyone. Today I have struggled with Nagios installation. After a long while I decided to reinstall some stuff and start from the beginning because nothing worked. Then ingeniously I typed something like this...
    yum remove nagios nagios-devel nagios-plugins* gd gd-devel httpd php gcc glibc glibc-common openssl

    Thereafter I can't:
    - connect to server through FileZilla
    - type yum,wget,mkdir,ls,tar
    - and many others basic commands

    I can:
    - pwd and cd

    [root(monkey)rmavm340 bin]# yum search
    bash: usr/bin/yum: No such file or directory

    Is there any way to retract those changes ?
    I am newbie in Linux.
    Best regards Rzodkiewka.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,173
    You will need to recover your system - it is now fubar! I would advise that if you can't get/burn a recovery disc for your distribution, that you boot a live cd/dvd/usb device, mount the partitions / file systems on the hard drive, back up the data you want to keep to an external drive, and then fully reinstall the OS.

    FWIW, there are tonnes of tutorials and documentation on the web for doing this stuff, and Nagios is pretty well documented. At the least, you could have posted your problems to the Nagios user forums and probably got lots of help from there.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Location
    Belgium
    Posts
    84
    1. which version of Fedora / Redhat you use?
    2. Can you still use rpm?


    When you still have rpm and it is on Fedora 19:
    • Try to downloadi following rpm packages from a mirror site and put them in a directory:
      pygpgme, pyliblzma, python, python-iniparse, python-urlgrabber, pyxattr, rpm, rpm-python, yum-metadata-parser, yum.
    • install these packages:
      Code:
      $> sudo rpm -U *.rpm
    • then try to reinstall the packages that were accidentally deleted.
      Code:
      $> yum reinstall nagios nagios-devel nagios-plugins* gd gd-devel httpd php gcc glibc glibc-common openssl


    Good luck.

  4. #4
    Just Joined!
    Join Date
    May 2013
    Posts
    37
    Well, if you take out glibc, you take out what most executables in the system depend upon, so the likelihood of still having an rpm executable is zero. On a functioning fedora/redhat system you can use:
    Code:
    ldd /usr/bin/rpm
    to ask what shared library dependencies underpin the rpm command and one of them is libc.so.<some number> and that libc file is from glibc. So, the situation calls for data saving perhaps with a rescue disk and a usb to download saved data to, then a reinstall. If the /home directory is on a partition of its own, then reinstallation may be possible without interfering with the home files.

  5. #5
    Just Joined!
    Join Date
    Jul 2013
    Posts
    4
    We are using red hat(cant determine which version right now). Administrators decided to reinstall server. Thanks everyone for help. As a curiosity I also tried to do the same thing on my virtual machine with fedora 14 in home. I was unable to delete YUM packet, it was protected likewise something related to kernel.

  6. #6
    Just Joined!
    Join Date
    Jun 2011
    Location
    Belgium
    Posts
    84
    Quote Originally Posted by Rzodkiewka View Post
    ... As a curiosity I also tried to do the same thing on my virtual machine with fedora 14 in home. I was unable to delete YUM packet, it was protected likewise something related to kernel.
    Maybe selinux may help. But honestly, I also do not use it.I feel ashamed.

  7. #7
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,738
    Code:
    yum remove nagios nagios-devel nagios-plugins* gd gd-devel httpd php gcc glibc glibc-common openssl
    I think only glibc (may be glic-common) is critical . May be you can get those files from other similar machine (same distro and arch) and scp into your machine . That should fix the issue. I would like 90% chance of recovering the system.

    You can find the contents of glibc* via command like repoquery.
    linux - How to list the contents of a package using YUM? - Stack Overflow

    Quote Originally Posted by Rzodkiewka View Post
    I was unable to delete YUM packet, it was protected likewise something related to kernel.
    Whats the error message ? I don't think yum enjoys special protection.

    Code:
    Maybe selinux may help.
    Not sure. I use Fedora can delete important files with Selinux enabled
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  8. #8
    Linux Newbie user-f11's Avatar
    Join Date
    Feb 2011
    Location
    Sofia, BG
    Posts
    185
    Quote Originally Posted by Rubberman View Post
    You will need to recover your system - it is now fubar! I would advise that if you can't get/burn a recovery disc for your distribution, that you boot a live cd/dvd/usb device, mount the partitions / file systems on the hard drive, back up the data you want to keep to an external drive, and then fully reinstall the OS.
    Definitely this is the shortest way to restore the OS 'in its former glory', but this is not mistake of the user. This is 'fatal system error' of the developers. The OS does not have elementary flaw resistance. Ever since F9 I have been watching this case scenario in various performances.
    Is it that difficult for libraries and dependancies that are fatal to the performance of the OS to be deleted in special mode and for the user to have the option to exclude them from the deletion list (after being informed what will happen)?!

  9. #9
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,173
    Well, I have to say that since yum displays all the dependencies of the items being removed (and it should have been a looooonnnnnng list) which the user has to confirm (unless they used the totally "oh sh!t" -y or --assumeyes options), this is definitely a learning experience for the poster, Rzodkiewka.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #10
    Just Joined!
    Join Date
    May 2013
    Posts
    37
    user-f11 said:
    This is 'fatal system error' of the developers.
    unix and its clones let you do disastrous things, but that's the price of freedom.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •