title: Ruby install aborted due to missing extensions: openssl, readline, zlib compilation error
body: <p>I'm using macOs Catalina. I'm trying to install older version of Ruby (1.9.3, 2.1.2) via rbenv.
  However, I keep getting the errors below, when trying installing older version. *It was fine when installing 2.4 or newer.</p>
  <p>I already try</p>
  <pre><code>brew install openssl
  brew install readline
  brew install zlib
  </code></pre>
  <p>as well as brew update.
  I have everything installed and up-to-dated but still the errors below keeps coming up.</p>
  <p>I also did tried to install with configure option</p>
  <pre><code>RUBY_CONFIGURE_OPTS=&quot;--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`&quot; rbenv install 2.1.2
  </code></pre>
  <p>Please let me know how I can fix this.</p>
  <blockquote>
  <p>ruby-build: using readline from homebrew</p>
  <p>BUILD FAILED (Mac OS X 10.15.7 using ruby-build 20201005)</p>
  <p>Inspect or clean up the working tree at
  /var/folders/80/ts3rxpm5199g71p1vm4xzydj03b4g3/T/ruby-build.20201113153529.74484.A9uFGC
  Results logged to
  /var/folders/80/ts3rxpm5199g71p1vm4xzydj03b4g3/T/ruby-build.20201113153529.74484.log</p>
  <p>Last 10 log lines:
  The Ruby openssl extension was not compiled.
  The Ruby readline extension was not compiled.
  The Ruby zlib extension was not compiled.
  ERROR: Ruby install aborted due to missing extensions
  Configure options used:<br />
  --prefix=/Users/username/.rbenv/versions/2.1.2<br />
  --with-openssl-dir=/usr/local/opt/openssl@1.0<br />
  --with-readline-dir=/usr/local/opt/readline<br />
  CC=clang<br />
  LDFLAGS=-L/Users/username/.rbenv/versions/2.1.2/lib<br />
  CPPFLAGS=-I/Users/username/.rbenv/versions/2.1.2/include</p>
  </blockquote>