Because some VPNs block the rsync port (tcp 873), the typical MacPorts install doesn’t work properly.  Use the instructions below to configure your MacPorts installation to use Subversion instead of rsync, so you can keep up to date even if you’re connected to a VPN.

# Open Terminal
curl http://distfiles.macports.org/MacPorts/MacPorts-1.9.2.tar.gz > MacPorts-1.9.2.tar.gz

tar -xzvf MacPorts-1.9.2.tar.gz
cd MacPorts-1.9.2
./configure && make && sudo make install

# add /opt/local/bin to PATH
     vi ~/.bash_profile
          export PATH=/opt/local/bin:/opt/local/sbin:$PATH
          export MANPATH=/opt/local/share/man:$MANPATH

source ~/.bash_profile

cd /opt/local/var/macports/sources
sudo mkdir -p svn.macports.org/trunk/dports
cd svn.macports.org/trunk/dports
sudo svn co http://svn.macports.org/repository/macports/trunk/dports/ .

# fix conf file
     sudo vi /opt/local/etc/macports/sources.conf
          #rsync://rsync.macports.org/release/ports/ [default]
          file:///opt/local/var/macports/sources/svn.macports.org/trunk/dports/ [default]

sudo port -d sync

# NOTE: "sudo port -v selfupdate" will NOT work - use "sudo port -d sync" instead
# "sudo port install " should work just fine

# example: install git
sudo port install git-core +svn +doc +bash_completion +gitweb

One Thought on “MacPorts behind VPN that blocks tcp 873

  1. Getting your ports up to date would look like:

    sudo port -d sync
    sudo port upgrade outdated
    sudo port uninstall inactive
    

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Post Navigation