Issue
I tried to do yum install zlib-devel
I got
src="https://i.stack.imgur.com/AuXcw.png" alt="enter image description here">
How can I fix this so I can use my yum install
again ?
Solution
Yum is broken because a python problem. You can use the rpm utility to reinstall python, or to manually install zlib-devel.
Yum ins't a requirement for installing packages. It just makes it more convenient. You can manually download any rpm package for CentOS. I prefer to find what I need using this search engine.
# Find a download url for zlib-devel rpm on rpm.pbone.net for
# centos6 and download to your server:
wget ftp://ftp.pbone.net/mirror/ftp.centos.org/6.8/os/x86_64/Packages/zlib-devel-1.2.3-29.el6.x86_64.rpm
# Install the rpm package
rpm -i ./zlib-devel-1.2.3-29.el6.x86_64.rpm
At this point, you may be told you are missing dependencies. Yum handles that for you automatically. But yum is broken :-( So download each of those dependency packages and install them the same way. Then try to install zlib-devel again.
You can re-install the python rpm package as well, using rpm from the command line. Check which python version is on your server using rpm -q python
or some variation. Then download the rpm package for python, and installing it manually.
Answered By - mjac Answer Checked By - Gilberto Lyons (WPSolving Admin)