12

I wanted to install tmux in a redhat 6 machine using yum, however this fails as I don't have root access. Any idea on how to install tmux locally without root access?

3 Answers 3

11

You will have to manually install it from source in your home directory and then add that to your path.

The process is straightforward enough and described in a few places, there is a script for V1.8 and a guide for V2.2. I would handrail off both but change everything to the latest version.

These scripts didn't work for me out the box, on step 6a, for version 6.0 nucrses I needed to use the command ./configure --prefix=$HOME/local CPPFLAGS="-P" instead of just ./configure --prefix=$HOME/local as per.

In summary, the process is:

  1. Make a temporary folder to work in
  2. Download the latest version of tmux. Follow the links to the dependencies and download those into your tempory directory.
  3. Setup a local library folder ($HOME/local)
  4. Setup a local binaries folder ($HOME/local/bin)
  5. extract the files (tar xvzf)
  6. Then for dependancies first and finnaly tmux:
    • configure (./configure --prefix=$HOME/local)
    • make
    • make install
  7. preappend to path (add this to .bashrc export PATH=$HOME/local/bin:$PATH)
3
  • 1
    It should be export PATH=$HOME/local/bin:$PATH. Otherwise, it worked, but I recommend sticking to the first script and executing it line by line, updating the software/library versions as necessary. It worked without any modifications on Red Hat 7.4
    – Ataxias
    Commented Apr 19, 2019 at 17:35
  • Thanks @Ataxias, I've adjusted the line
    – Aaron
    Commented Apr 22, 2019 at 20:58
  • 1
    As pointed out by @James Wright, tmux (3.0a) is being distributed by App Image which may be easier to install.
    – Aaron
    Commented Mar 27, 2020 at 11:00
21

An alternative solution is to install miniconda (no sudo needed) via

$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ bash Miniconda3-latest-Linux-x86_64.sh

and then install tmux

$ conda install -c conda-forge tmux

also get a bonus htop

$ conda install -c conda-forge htop
3
  • Thank you so much! I spent more than an hour trying to install tmux before I saw this answer.
    – fbartolic
    Commented Oct 8, 2020 at 14:36
  • This answer is magic <3 Commented Mar 29, 2022 at 9:23
  • Does not work with older version of GLIBC :( failed because the box I am running is using 2.12. Also even if you can run Miniconda, you need an internet connection to actually forge anything with it. This is not an acceptable answer for anyone that has restricted network access on the host.
    – Dave
    Commented Nov 9, 2022 at 20:59
1

I found this repository very useful.

You just download the appimage and alias tmux to the appimage. Done. Hope it works also for your distro. For me it works in CentOS8.

4
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 1, 2022 at 4:00
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Toto
    Commented Mar 1, 2022 at 8:15
  • This solution is better than the above two. No need to mess up with compile or miniconda, just download the tmux-appimage and it just works.
    – Qinsi
    Commented Nov 8, 2022 at 3:20
  • Using CentOS6.10, appimage does not work on this system. Must compile from source.
    – Dave
    Commented Nov 9, 2022 at 14:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .