Help us understand the problem. What is going on with this article?

plenv install-cpanm でエラー

More than 5 years have passed since last update.

plenv install-cpanm を実行すると、以下の様なエラーが出る環境があった。

$ plenv install-cpanm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   303    0   303    0     0   2648      0 --:--:-- --:--:-- --:--:--  2657
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100   226  100   226    0     0    198      0  0:00:01  0:00:01 --:--:--   198
Bareword found where operator expected at - line 3, near "400 Bad"
        (Missing operator before Bad?)
Bareword found where operator expected at - line 6, near "<p>Your"
        (Missing operator before Your?)
syntax error at - line 2, near "html>"
Execution of - aborted due to compilation errors.

install-cpanm内部で使っているcurlコマンドが怪しいということで、
curlコマンドのバージョンを調べた。

$ curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz

バージョンに関係なく、SSL通信にNSSが使われているのが問題そうなので、
OpennSSLに切り替えた。

ただ、yumでなんとかOpenSSLに切替えようとしたが、
やり方が分からなかったので、以下の手順でコンパイルした。

# cd /usr/local/src
# wget http://curl.haxx.se/download/curl-7.36.0.tar.gz
# tar xvzf curl-7.36.0.tar.gz
# cd curl-7.36.0
# ./configure --prefix=/usr/local --with-openssl
# make && make install
# mv /usr/bin/curl /usr/bin/curl.old

予想通りOpenSSLを使用したcurlではうまく行った。
うまく行ったcurlのバージョンは以下のとおり。

$ curl --version
curl 7.36.0 (x86_64-unknown-linux-gnu) libcurl/7.36.0 OpenSSL/1.0.1e zlib/1.2.3 libidn/1.18
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz

ひとまず問題なくなったが、Chefでyumインストールしている部分なので、
確実にOpenSSLを使用するcurlをyumでインストールしたい。

けど、やり方はまだわかっていない。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away