Skip to content

Instantly share code, notes, and snippets.

@tomasbasham
Forked from Fi5t/install_tmux_osx_no_brew
Last active April 29, 2024 08:46
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save tomasbasham/1e405cfa16e88c0f5d2f49bbbd161944 to your computer and use it in GitHub Desktop.
Save tomasbasham/1e405cfa16e88c0f5d2f49bbbd161944 to your computer and use it in GitHub Desktop.
Install tmux on OSX WITHOUT brew
# Create a directory
mkdir ~/tmux-install
cd ~/tmux-install
# Get the files
curl -OL https://www.openssl.org/source/openssl-1.0.2l.tar.gz
curl -OL https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
# Extract them
tar xzf openssl-1.0.2l.tar.gz
tar xzf tmux-2.3.tar.gz
tar xzf libevent-2.0.22-stable.tar.gz
# Compile openssl
cd openssl-1.0.2l
./Configure darwin64-x86_64-cc --prefix=/usr/local --o
make CFLAGS='-I/usr/local/ssl/include'
make test
sudo make install
# Compile libevent
cd ../libevent-2.0.22-stable
./configure
make
sudo make install
# Compile tmux
cd ../tmux-2.3
LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" LIBS="-lresolv" ./configure --prefix=/usr/local
make
sudo make install
@rw3iss
Copy link

rw3iss commented Jul 21, 2020

Righteous! Thank you.

@smelserm
Copy link

smelserm commented Feb 1, 2021

Awesome!! Thank you!!

@mohitjain-21
Copy link

This is amazing .. Thanks you many times

@paulistoan
Copy link

Failing for me on macOS 12.6 with:

bash-3.2$ make CFLAGS='-I/usr/local/ssl/include'
making all in crypto...
/usr/bin/perl ../util/mkbuildinf.pl "cc -I/usr/local/ssl/include" "darwin64-x86_64-cc" >buildinf.h
cc -I/usr/local/ssl/include   -c -o cryptlib.o cryptlib.c
In file included from cryptlib.c:117:
./cryptlib.h:65:11: fatal error: 'e_os.h' file not found
# include "e_os.h"
          ^~~~~~~~
1 error generated.
make[1]: *** [cryptlib.o] Error 1
make: *** [build_crypto] Error 1
bash-3.2$

Seems I need the libssl-dev package as per this post. Any thoughts on how to install that without brew?

@paulistoan
Copy link

I was able to get around this by disabling openssl in the libevent configure command: ./configure --disable-openssl. I also had to add --disable-utf8proc to the tmux configure command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment