Followed a terrible guide and ran "yum remove pcre*" on my CentOS 5.5. Now it appears the server is down
What can I do? Even "yum" is not available.
Solution 1:
You really have two options at this point:
- Attempt to Repair
- Restore from Backups/Rebuild
Repairing can be a very tricky thing to do. You will first need to pull down the rpms for yum and install them manually, assuming rpm will still work. From there look through your yum log and figure out what all packages to reinstall. It could be very labor intensive, and most likely not worth doing. However, with that disclaimer, this might help you get started. The dependency list for yum consists of:
python-elementtree python python-iniparse python-sqlite python-urlgrabber rpm rpm-python yum-metadata-parser yum
You may need to get the additional packages for those to install, but as I said, this was a starting point. Once you have yum working you need to build out the list of packages that were removed. Since all yum operations are logged, this should actually be fairly easy. By going through /var/log/yum.log
looking for the string "Erased:" you can determine what was uninstalled. Try running this command to make things easier:
cat /var/log/yum.log* | awk '/Erased:/ {print $NF}' > removed_packages.txt
Now that you have your package list, you can start building out your re-install list by doing something like:
cat removed_packages.txt | xargs -n 100 yum install
Although, in the end, a fresh install may be the easiest way to go, particularly if you're in a rush.
Solution 2:
What can I do?
Restore from backups.