LWP failed with code[400] message[FTP return code 150]

By devenix

Hi ,

M back,

while installing the cpan modules for perl , i was getting the above error.

so following below solution worked out for it.

Use the cpan command-line tool. This can also be invoked via the command

perl -MCPAN -e shell

In the shell, type

install <packagename>

where <packagename> is something like Time::HiRes or Tk.

If it hangs for ages whilst trying to download files over FTP, or get errors like

LWP failed with code[400] message[FTP return code 150]

then try setting the FTP_PASSIVE environment variable before running cpan:

export FTP_PASSIVE=1

Tags: ,

3 Responses to “LWP failed with code[400] message[FTP return code 150]”

  1. sbeam Says:

    ok thanks for this – it worked!

    but why? I never used to have to set this. Is it a firewall issue?

  2. Carlos Hernández Says:

    it wirked, but I have the same question, never did it before, never got a problem… weird.

  3. T Says:

    I was experiencing this error, even with it said in the cpan shell:

    cpan[3]> o conf ftp_passive
    ftp_passive [1]

    Your fix still worked, thanks.

Leave a Reply