FedoraForum.org - Fedora Support Forums and Community
Results 1 to 2 of 2
  1. #1
    cykill Guest

    accidently deleted rpm installer.

    i accidently deleted rpm installer. anyone know how to reinstall the binary? some tricks maybe?

    i tried to install from source code but it gives me this error when doing "make"

    In file included from glob.c:47:
    ../system.h:295:29: selinux/selinux.h: No such file or directory
    make[2]: *** [glob.o] Error 1

    The file is not there when i unzipped the rpm tarball.

    Please help. Thanks.

  2. #2
    Join Date
    Jun 2005
    Location
    Italy
    Posts
    1,108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Installing rpm's rpm without... rpm!

    Be extra careful with the following instructions.
    Download (or copy from the original FC cd/dvd) the rpm-4.4.1-21.i386.rpm package (I assume here that you are using FC4 - if not, search for the package suited for your distro version; the rest of the procedure is the same).
    Download this script and make it executable (chmod 775 rpm2cpio.sh)

    http://www.rpm.org/tools/scripts/rpm2cpio.sh

    Copy the script and the rpm-4.4.1-21.i386.rpm package in the / directory - that is, in the top directory of the filesystem.
    From the / directory, run the following command as root:

    Code:
    ./rpm2cpio.sh rpm-4.4.1-21.i386.rpm | cpio -ivd
    This will extract the files from the rpm-4.4.1-21.i386.rpm package and place them in the right directories, as if you installed it with the rpm command, but without updating the rpm database nor executing any postinstall script. You can find a description of the command here

    http://www.rpm.org/max-rpm/s1-rpm-mi...-rpm2cpio.html

    and I strongly suggest that you read it.
    The pre- and post-install script are described in the attached file, that I extracted from the rpm-4.4.1-21.i386.rpm package. You have to run them manually in a console window.

    At the end, as extra security option, you could run

    Code:
    rpm -ivh --force rpm-4.4.1-21.i386.rpm
    This should install rpm over itself, updating the rpm database and executing the pre- and post-install scripts as usual.
    Last edited by daneel971; 4th September 2005 at 10:56 AM. Reason: added attachment
    - Captain...
    - Yes, Spock?
    - I can't believe my ears...

Similar Threads

  1. accidently deleted the crontab file
    By jerry08 in forum Using Fedora
    Replies: 2
    Last Post: 6th January 2009, 06:18 PM
  2. Accidently deleted /sbin, howto restore?
    By eijckron in forum Installation, Upgrades and Live Media
    Replies: 10
    Last Post: 12th November 2005, 10:46 PM
  3. /var/log accidently deleted
    By Camino in forum Using Fedora
    Replies: 2
    Last Post: 8th October 2005, 02:10 PM
  4. Accidently deleted kernel source
    By Bonez in forum Using Fedora
    Replies: 15
    Last Post: 23rd August 2005, 09:25 AM
  5. I accidently deleted /tmp... what now?
    By Bear Knuckle in forum Using Fedora
    Replies: 3
    Last Post: 13th April 2005, 09:36 AM

Tags for this Thread

Posting Permissions

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