title: HTTP2 with CURL gives "Unsupported Protocol"
body: <p>Having already followed the steps from <a href="https://stackoverflow.com/questions/20116949/using-http2-0-option-with-curl-7-33-0-gives-unsupported-protocol">here</a>, I still have <code>Unsupported Protocol</code> when using curl <code>--http2</code> option. Similarly, setting the <code>CURLOPT_HTTP_VERSION</code> to <code>CURL_HTTP_VERSION_2_0</code> results in the program communicating using HTTP/1.1, not HTTP/2.</p>
  
  <p>Platform: Ubuntu 15.04 on VMware Player 7.</p>
  
  <p>I have installed nghttp2-1.0.4 with <code>--prefix=/usr/local</code>, hence the libnghttp2.* is located in <code>/usr/local/lib</code>.</p>
  
  <p>This is the code to configure curl-7.43.0:</p>
  
  <pre><code>./configure --with-nghttp2=/usr/local
  </code></pre>
  
  <p>The result shows that HTTP2 is enabled:</p>
  
  <pre><code>    HTTP2 support:    enabled (nghttp2)
  </code></pre>
  
  <p>After <code>make</code> and <code>sudo make install</code>, the following returns <code>Unsupported Protocol</code>:</p>
  
  <pre><code>curl --http2 https://http2.akamai.com
  </code></pre>
  
  <p>The curl version doesn't show nghttp2 is supported:</p>
  
  <pre><code>curl 7.43.0 (i686-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
  Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp 
  Features: AsynchDNS IDN IPv6 Largefile GSS-API SPNEGO NTLM NTLM_WB SSL libz TLS-SRP
  </code></pre>
  
  <p>Then I followed the advise from <a href="https://stackoverflow.com/questions/29759380/curl-is-not-working-with-nghttp2">here</a>, that I need to have OpenSSL 1.0.2 or higher. Having installed that in /opt/openssl, I reconfigured:</p>
  
  <pre><code>./configure --with-nghttp2=/usr/local --with-ssl=/opt/openssl/lib
  </code></pre>
  
  <p>After <code>make</code> and <code>sudo make install</code>, all problems remain the same. Strangely enough, the <code>curl --version</code> still returns the same information as above, with OpenSSL/1.0.1f not yet upgraded.</p>
  
  <p>Any help that allows me to successfully use the <code>--http2</code> option is greatly appreciated.</p>