Install lftp on OSX yosemite

Thomas edited this page Nov 20, 2016 · 11 revisions

Installation

wordmove requires lftp. (In order to work over FTP connections)

lftp has a lot of dependencies and is very hard to install in OSX Yosemite.

There are several installation guides on the Internet, but many do not work in all OSX environments.

I suggest this (tested and working):

  1. Install Xcode from : https://developer.apple.com/xcode/downloads/
  2. Go to terminal
  3. Install homebrew : ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  4. Apply homebrew doctor : brew doctor
  5. Install lftp : brew install lftp

If brew does not find the lftp formula, use brew install homebrew/boneyard/lftp instead

That's all folks!!!

Configuration and tips

Sometimes, lftp installation will fail with the following error: Fatal error: Certificate verification: subjectAltName does not match

In this case, I suggest this:

  1. Go to terminal
  2. Create a lftp path : mkdir ~/.lftp
  3. Create a configuration file for lftp : nano ~/.lftp/rc
    1. If server's certificate is not signed by a known Certificate Authority, you can disable lftp check by adding set ssl:verify-certificate no to your ~/.lftprc or ~/.lftp/rc
    2. If host name used to connect to the server does not corresponds to the host name in its certificate, you can disable lftp check by adding set ssl:check-hostname no to your ~/.lftprc or ~/.lftp/rc
  4. Save ( ^o e ^x )
  5. Exit terminal

If you want to force unsafe connection (without TLS) add these lines to your ~/.lftp/rc file:

set ftp:ssl-force false
set ftp:ssl-protect-list false
set ftp:ssl-allow false

More lftp configuration flags here.