-
-
Save shrayasr/8714601 to your computer and use it in GitHub Desktop.
Check https://gist.github.com/devisions/004999452e95de9058de2edc1656ca04 for a more up to date version |
# Create a directory | |
mkdir ~/tmux-install | |
cd ~/tmux-install | |
# Get the files | |
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz | |
curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz | |
# Extract them | |
tar xzf tmux-1.5.tar.gz | |
tar xzf libevent-2.0.16-stable.tar.gz | |
# Compile libevent | |
cd libevent-2.0.16-stable | |
./configure --prefix=/opt | |
make | |
sudo make install | |
# Compile tmux | |
cd ../tmux-1.5 | |
LDFLAGS="-L/opt/lib" CPPFLAGS="-I/opt/include" LIBS="-lresolv" ./configure --prefix=/opt | |
make | |
sudo make install | |
# Link it | |
ln -s /opt/bin/tmux /usr/bin/tmux |
Hi, I have a problem with OSX 10.12 Sierra...
the libevent depo has changed by:
"https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz"
source: http://libevent.org/old-releases.html
because I have an error when I try install libevent with sourceforge...
and,
I have this error when I type "make"
bufferevent_openssl.c:60:10: fatal error: 'openssl/bio.h' file not found
#include <openssl/bio.h>
^
Have you an idea why?
Regards.
I have this error when I type "make"
bufferevent_openssl.c:60:10: fatal error: 'openssl/bio.h' file not found
#include <openssl/bio.h>
^
Have you an idea why?
The openssl headers were removed from OSX in El Capitan.
To fix openssl headers when compiling libevent use this instead of ./configure prefix=/opt
./configure LDFLAGS='-L/usr/local/opt/openssl/lib' CPPFLAGS='-I/usr/local/opt/openssl/include' prefix=/opt
Thanks for the script!
Here is below an updated version, including the latest releases of tmux and libevent (as of today, 2017-06-20
), with a little more verbosity and small fixes.
It is working just fine on my system:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.5
BuildVersion: 16F73
$
install_tmux_osx_no_brew.sh
## setup _________________________________
TMUX_VER=2.5
LIBEVENT_VER=2.1.8-stable
TEMP_COMPILE=~/tmux-temp-compile
COMMON_INSTALL_PREFIX=/opt
SYMLINK=/usr/local/bin/tmux
## _______________________________________
echo
echo ">>> Creating and using temporary dir ${TEMP_COMPILE} for downloading and compiling libevent and tmux ..."
echo
mkdir ${TEMP_COMPILE}
cd ${TEMP_COMPILE}
echo
echo ">>> Downloading the releases ..."
echo
curl -OL https://github.com/tmux/tmux/releases/download/${TMUX_VER}/tmux-${TMUX_VER}.tar.gz
curl -OL https://github.com/libevent/libevent/releases/download/release-${LIBEVENT_VER}/libevent-${LIBEVENT_VER}.tar.gz
echo
echo ">>> Extracting tmux ${TMUX_VER} and libevent ${LIBEVENT_VER} ..."
echo
tar xzf tmux-${TMUX_VER}.tar.gz
tar xzf libevent-${LIBEVENT_VER}.tar.gz
echo
echo ">>> Compiling libevent ..."
echo
cd libevent-${LIBEVENT_VER}
./configure --prefix=${COMMON_INSTALL_PREFIX}
sudo make
sudo make install
echo
echo ">>> Compiling tmux ..."
echo
cd ../tmux-${TMUX_VER}
LDFLAGS="-L${COMMON_INSTALL_PREFIX}/lib" CPPFLAGS="-I${COMMON_INSTALL_PREFIX}/include" LIBS="-lresolv" ./configure --prefix=${COMMON_INSTALL_PREFIX}
make
echo
echo ">>> Installing tmux in ${COMMON_INSTALL_PREFIX}/bin ..."
echo
sudo make install
echo
echo ">>> Symlink to it from ${SYMLINK} ..."
sudo ln -s ${COMMON_INSTALL_PREFIX}/bin/tmux ${SYMLINK}
echo
echo ">>> Cleaning up by removing the temporary dir ${TEMP_COMPILE} ..."
echo
cd ..
sudo rm -rf ${TEMP_COMPILE}
Thanks for these scripts. Very helpful!
Thanks!!!
Very useful!!
@DEVisions is the best modification at this time.
Can confirm the following variables work:
TMUX_VER=2.9a
LIBEVENT_VER=2.1.11-stable
Under the latest OSX version (as of today)
❯ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G95
Sure. Based on the previously listed script, updated the two vars, ran it again and everything went fine.
Maybe just the symlink creation should include the force flag: sudo ln -sf ${COMMON_INSTALL_PREFIX}/bin/tmux ${SYMLINK}
Result:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G103
$
$ tmux -V
tmux 2.9a
$
you should make your own gist, this is the far superior script.
@mkatychev
Sure, thanks, here it is.
Cheers @DEVisions, I will update the gist to point to yours :)
@shrayasr Sure! Glad to help. :)
I've made some useful changes this file.
See my fork