How to fix rpm commands (accidentally delete rpm commands)

Source: Internet
Author: User

How to fix rpm commands (accidentally delete rpm commands)

When executing the rpm-e -- nodeps command, I did not note that I wrote the rpm-e -- nodepsrpm command. As a result, the rpm was uninstalled. I can do this! You can also stop yourself. But if it commits suicide, it should be able to be revived. Think about the solution. If you use the reinstall method to solve this problem, it will not be resolved. Therefore, by directly compiling:

Tarxjvfrpm-4.8.0.tar.bz2

Then./configure & make install

Solve this problem. As a result, gcc is not installed on this machine!

Why?

Can I copy data directly from another machine? So I run the following command on the machine where the rpm package is installed:

Rpm-ql rpm

Rpm-ql rpm-libs

Copying all the files it lists to the target machine is really physical, and the time consumption is not too high! But it really works!

Happy!

But the rpm command of the copied machine does not reflect any, so it is depressing! I searched for the solution on the Internet:

Fix the rpm command (accidentally delete the rpm command) method or
/Var/lib/rpm> rm __*
/Var/lib/rpm> rpm -- rebuildd cannot be connected, so it is depressing! I thought about it again. I didn't respond when I only run the rpm command. The above command is useless. Is the rpm file damaged? Where can I find this rpm file? I downloaded a rpm-4.8.0-37.el6.x86_64.rpm on the Internet but how to decompress it, there is a command: rpm2cpiorpm-4.8.0-37.el6.x86_64.rpm | cpio-div I will uncompress/bin/rpm with the system bin/rpm replacement, after executing rpm, all right! Remind yourself to do things seriously in the future!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.