-1

I can't install Perlbrew using the easy script: curl -L http://install.perlbrew.pl | bash

I did it before, easily, but now, in a brand new CentOS 6.5, I get a 400 Bad Request.

This is the output:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
113   226  113   226    0     0    187      0  0:00:01  0:00:01 --:--:--   187
bash: line 1: syntax error near unexpected token `newline'
bash: line 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'

And this is the response if I do the curl part (without passing it to bash)

curl -L http://install.perlbrew.pl

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
  <head>
    <title>400 Bad Request</title>
  </head>
  <body>
    <h1>Bad Request</h1>
    <p>Your browser sent a request that this server could not understand.<br />
    </p>
  </body>
</html>

This is my Curl version: curl -V

curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp

Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

Usual compilers are also installed with yum groupinstall 'Development Tools'

What can be failing? It is really strange...

Nacho B
  • 1,573
  • 1
  • 12
  • 16
  • Try again, Its working now. Good luck. – shellter May 03 '14 at 21:56
  • Not working here. Maybe something is missing, or something is not needed in my new Centos. The message includes "Your browser sent a request that this server could not understand". So Curl (or Bash) is sending something wrong. – Nacho B May 04 '14 at 09:35

1 Answers1

0

The http://install.perlbrew.pl link actually points to https://raw.githubusercontent.com/gugod/App-perlbrew/master/perlbrew-install, which is a bash script. I believe that the curl command in this script is the one having the problem.

Try this: Save the perlbrew-install bash script to your machine edit the curl line:

PERLBREWDOWNLOAD="curl -f -sS -Lo $LOCALINSTALLER $PERLBREWURL"

by adding the -k option to disable cert validation (See curl insecure option). Comment out the surrounding if/else statements and then run the script from your command line.

Alternatively, you could try installing wget and do the suggested command from the perlbrew.pl site:

wget -O - http://install.perlbrew.pl | bash

Community
  • 1
  • 1
interduo
  • 401
  • 6
  • 10
  • Great, it works using the insecure option. Great. But i do not fully understand if the problem is in my server or in the target server. Maybe it is because mine has a self signed certificate? – Nacho B May 07 '14 at 22:17
  • 1
    I just ran into this recently as well on Oracle Linux 6.5 (curl version 7.19.7 ). Making same request from an Ubuntu host succeeds where curl verson 7.22.0. So, believe this is a curl issue. Unfortunately, 7.19.7 is currently the most recent curl for Oracle Linux 6.5 – user3183018 May 13 '14 at 11:42