Alpine on MacOS

MacOS is a rather modern and highly GUI version of UNIX, so who would want to run alpine, an old-fashioned text mode only email client on it? Who knows, but one can. And not only is it possible, but it is fairly easy to built it from sources, rather than relying on Macports or some binary distribution. Instructions below:

(All the below instructions are to be typed in a terminal window. They install alpine in one's home directory, rather than in any system directories. Precise version numbers (1.1.1v and 2.26) will surely need changing -- they were correct in September 2023.)

1/ Make sure that a sufficiency of Xcode is installed.

  xcode-select --install

2/ Download the latest version of OpenSSL 1.1.1 from

  curl -O

(If on old Macs this fails due to certificate issues, either be reckless and add -k before the -O, or fix the MacOS certificates problem properly.)

3/ Extract archive

  tar -xf openssl-1.1.1v.tar.gz
  cd openssl-1.1.1v

4/ One needs to tell OpenSSL which OS one is using, so either

  ./Configure --prefix=$HOME darwin64-x86_64-cc

for old Intel-based Macs, or, for ARM-based Macs (M1s)

  ./Configure --prefix=$HOME darwin64-arm64-cc

4a/ Be prudent, even though it is the longest part.

  make tests

5/ Install OpenSSL into one's home directory

  make install
  cd ..

5a/ Install some certificates. I had not documented this with 1.1.1m, but it is certainly needed with 1.1.1v.

  pushd ~/ssl
  curl -O
  mv cacert.pem cert.pem

6/ Download the alpine source code from its distribution site.

  curl -O


  curl -O

7/ Extract archive

  tar -xf alpine-2.25.tar.xz
  cd alpine-2.25

8/ Configure. Omit the --without-ipv6 if you want IP v6 support, or keep it if you believe that IP v6 currently causes more issues than it solves!

  ./configure --prefix=$HOME --with-ssl-dir=$HOME --without-ipv6

9/ Build and install.

  make install

This should leave alpine correctly installed in ~/bin. Unusually for a UNIX, MacOS does not place this directory on the default searchpath for executables. This can be solved by adding the line:


to a file called ~/.bash_profile (if one's login shell is bash) or ~/.zprofile for zsh.

  echo 'PATH=${HOME}/bin:${PATH}' >> ~/.bash_profile


  echo 'PATH=${HOME}/bin:${PATH}' >> ~/.zprofile

At this point it ought to be possible to start a new Terminal window, type alpine, and enjoy the usual features of alpine. URLs will be correctly passed to one's default web browser, and other external viewers should function correctly.