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!