I don’t like corporate environments where all the useful stuff is blocked (like FTP, NTP, ssh, git), and you have to deal with sysadmins, security people, and other staff to allow that. Sometimes it’s faster to find a workaround though. Today I’ll tell you how I install Homebrew packages that are supposed to be downloaded via FTP.
As an example, you want to install
lftp, which requires
gnutls that can be officially downloaded from
Open the terminal (
cd /usr/local, open the
Library/Formula/gnutls.rb file, and change the
, which means we’ll serve the file ourselves. Commit the change.
Find an online service that allows you to access an FTP server via its webpage. I use light and simple http://www.net2ftp.com/. Download the required file from the
url address you replaced in the formula above. Say, you’ve downloaded it to the
~/Downloads directory. What’s the simplest way to start a web server to provide the file?
cd ~/Downloads and run the server:
1 2 3
Then run the homebrew’s update process:
1 2 3 4 5 6 7 8 9 10 11 12 13
It works! Instead of going to a blocked FTP, homebrew got the file locally. Now stop the server:
1 2 3 4