59

I was just adding tmux plugins to my .tmux.conf file to find out that one of the plugins (tmux-copycat I think) requires tmux 1.9. When I start tmux I get the message `Error: Tmux version unsupported. Please install tmux version 1.9 or greater!".

So, what is the best way to upgrade tmux 1.8 to 1.9 on Ubuntu 14.04?

Dave Remy
  • 834
  • 2
  • 8
  • 10

3 Answers3

134

Update: due to new tmux version and changes in package repository, this answer is updated to show how to install tmux 2.0 (which is better, no reason to use 1.9 anymore).

Here are the steps to update "blank" ubuntu - version 14.04 only (see below for other ubuntu versions):

  1. sudo apt-get update
  2. sudo apt-get install -y python-software-properties software-properties-common
  3. sudo add-apt-repository -y ppa:pi-rho/dev
  4. sudo apt-get update
  5. sudo apt-get install -y tmux=2.0-1~ppa1~t
  6. now if you do tmux -V it should show tmux 2.0 which is a good version for tmux plugins

I verified the above steps on a new digitalocean droplet.

Basically, it's adding the pi-rho/dev repository, updating and then installing tmux from there.

If you have another ubuntu version you might want to install a different tmux version from the same repo. So:

  • ubuntu 12.04 (Precise Pangolin) step 5: sudo apt-get install -y tmux=1.9a-1~ppa1~p (installs tmux 1.9, no package for tmux 2.0 yet)
  • ubuntu 13.10 (Saucy Salamander) step 5: sudo apt-get install -y tmux=1.9a-1~ppa1~s (installs tmux 1.9, no package for tmux 2.0 yet)
  • ubuntu 14.10 (Utopic Unicorn) step 5: sudo apt-get install -y tmux=2.0-1~ppa1~u
  • ubuntu 15.04 (Vivid Vervet) step 5: sudo apt-get install -y tmux=2.0-1~ppa1~v
  • `E: Version '1.9a-1~ppa1~t' for 'tmux' was not found` – quant May 15 '15 at 04:50
  • Apparently the package was removed from the repository. I've updated the answer to show how to install tmux `2.0` –  May 15 '15 at 11:28
  • 6
    If you already have tmux installed, you can just run `sudo apt-get upgrade` (or `dist-upgrade` if apt says it will be kept) after adding the ppa and updating the sources. Or, if tmux is not installed, you are not compelled to specify the version. `sudo apt-get install tmux` works and installs the latest (2.0+ for the moment) – Gabriel Aug 17 '15 at 07:53
  • Gabriel's comment is the cleaner way to go. for me the specific upgrade command worked: sudo apt-get upgrade tmux – mork Dec 13 '16 at 06:13
8

If you don't want to add a PPA, you can just build it from source. It's explained in the README on tmux's GitHub page:

To build tmux from a release tarball, do:

$ ./configure && make
$ sudo make install

You might need to install some extra packages to build it. On Ubuntu I needed to install these packages before it would successfully build:

exuberant-ctags
cmake
libevent-dev
libncurses5-dev
gitaarik
  • 42,736
  • 12
  • 98
  • 105
3

Another way to do #3 above (especially if you are using a corporate proxy that might break ppa).

sudo add-apt-repository -y http://ppa.launchpad.net/pi-rho/dev/ubuntu

If using a tool like Artifactory to act as a caching package proxy

sudo add-apt-repository -y http://my.artifactory.site/ppa.launchpad.net/pi-rho/dev/ubuntu

or

sudo add-apt-repository -y http://my.domain/artifactory/ppa.launchpad.net/pi-rho/dev/ubuntu
dragon788
  • 3,583
  • 1
  • 40
  • 49