I’ve been working on some Rails stuff on a fresh Ubuntu install and came across this issue when trying to install Rails. I get the message “zlib is missing necessary for building libxml2”. Here’s how to fix it:
In the terminal run the following command:
“sudo apt-get install zlib1g-dev”
After that it installed properly and I was able to continue on my merry way!