CentOS 6.x の wgetでSSL handshake error が出る場合の対処方法
いつからか知りませんが、wget で github からリリース資材をダウンロードしようとするとエラーになってしまうようです。
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz --2014-08-10 14:57:44-- https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz Resolving github.com... 192.30.252.131 Connecting to github.com|192.30.252.131|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://cloud.github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz [following] --2014-08-10 14:57:45-- https://cloud.github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz Resolving cloud.github.com... 54.230.108.198, 54.230.108.165, 54.230.111.106, ... Connecting to cloud.github.com|54.230.108.198|:443... connected. OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure Unable to establish SSL connection.
対処方法は、curl を使いましょう!ですw
githubのように302foundとlocationを返してきてたらい回しにされる場合に備えて、-L
オプションをつけてたり、outputファイルを指定する -o
を指定する必要があるのでちょっと面倒ですね。
# インストールしてない場合はyumで入れてからどうぞ。 $ sudo yum install curl $ curl -L https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz -o libevent-2.0.21-stable.tar.gz
ちなみにまったく関係ないですが、libeventの2.0系はtmuxの1.9aのインストールに必要です。