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
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
- 506
- 5
- 5
-
Thank you so much! I spent more than an hour trying to install tmux before I saw this answer. – fbartolic Oct 08 '20 at 14:36
-
This answer is magic <3 – Aerinmund Fagelson Mar 29 '22 at 09: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 Nov 09 '22 at 20:59
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:
- Make a temporary folder to work in
- Download the latest version of tmux. Follow the links to the dependencies and download those into your tempory directory.
- Setup a local library folder ($HOME/local)
- Setup a local binaries folder ($HOME/local/bin)
- extract the files (
tar xvzf) - Then for dependancies first and finnaly tmux:
- configure (
./configure --prefix=$HOME/local) makemake install
- configure (
- preappend to path (add this to
.bashrcexport PATH=$HOME/local/bin:$PATH)
- 226
- 2
- 7
-
1It 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 Apr 19 '19 at 17:35
-
-
1As pointed out by @James Wright, [tmux (3.0a)](https://github.com/tmux/tmux/releases/tag/3.0a) is being distributed by [App Image](https://appimage.org/) which may be easier to install. – Aaron Mar 27 '20 at 11:00
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.
- 21
- 1
-
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](/help/how-to-answer). – Community Mar 01 '22 at 04: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](/review/late-answers/1110952) – Toto Mar 01 '22 at 08: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 Nov 08 '22 at 03:20
-
Using CentOS6.10, appimage does not work on this system. Must compile from source. – Dave Nov 09 '22 at 14:09