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
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
) make
make install
- configure (
- preappend to path (add this to
.bashrc
export PATH=$HOME/local/bin:$PATH
)
-
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– AtaxiasCommented Apr 19, 2019 at 17:35 -
-
1As pointed out by @James Wright, tmux (3.0a) is being distributed by App Image which may be easier to install.– AaronCommented Mar 27, 2020 at 11:00
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
-
Thank you so much! I spent more than an hour trying to install tmux before I saw this answer. Commented Oct 8, 2020 at 14:36
-
-
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.– DaveCommented Nov 9, 2022 at 20:59
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.
-
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 BotCommented 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– TotoCommented 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.– QinsiCommented Nov 8, 2022 at 3:20
-
Using CentOS6.10, appimage does not work on this system. Must compile from source.– DaveCommented Nov 9, 2022 at 14:09