[SOLVED] Installing tmux from source as non root user.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a user account on a Debian machine. I am attempting to install tmux from source as a non-root user because I do not have administrative rights to the server that I hold an account on. The only dependency that is missing in order to install tmux is the libevent-dev files. This means that I need to build libevent-dev from source, but unfortunately I can only find .deb package files for libevent on the internet.
a) Is it possible to install a .deb file as non root user into my home directory?
b) If not, where can I find the tarball for the libevent-dev files so I can build this dependency in my home folder from source?
In Debian-based distributions, the libraries and actual binaries for packages are generally separated into two different packages. So for example, there would be a package for libevent if you just wanted to use libevent, but then a libevent-dev package that installs the libevent libraries necessary to actually compile an application against it.
But the original source for both of these packages would be just libevent, so you don't need to find the "source" for libevent-dev, since that is just an offshoot of the same program. So downloading and building libevent (make sure to use the same version as what is already installed) in /home should give you the libraries necessary to build something against it.
In the "configure" script for tmux, you will need to tell it to look for the libraries under /home as well, since you won't be able to install them system-wide (which is where the configuration will look for them).
Thanks. I found the source and installed it my $HOME/local directory.
Now, to install TMUX, the next commands I ran were
~/tmux-1.4$ ./configure --prefix=$HOME/bin
Configured for Linux
cc -DBUILD="\"1.4\"" -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -iquote. -c -o attributes.o attributes.c
In file included from attributes.c:23:
tmux.h:30:19: error: event.h: No such file or directory
In file included from attributes.c:23:
tmux.h:830: error: field ‘name_timer’ has incomplete type
tmux.h:1032: error: field ‘key_timer’ has incomplete type
tmux.h:1093: error: field ‘event’ has incomplete type
tmux.h:1117: error: field ‘repeat_timer’ has incomplete type
tmux.h:1139: error: field ‘identify_timer’ has incomplete type
tmux.h:1142: error: field ‘message_timer’ has incomplete type
make: *** [attributes.o] Error 1
This is the same exact output I had before compiling libevent, so I'm assuming I haven't make the config file aware of the include files, since event.h is in $HOME/local/include. Does anybody see where I went wrong. Can anyone point me in the right direction? I think I'm almost there.
I tried the steps you mentioned. I'm still getting the error you mentioned earlier.
tty-term.c:24:20: error: curses.h: No such file or directory
tty-term.c:29:18: error: term.h: No such file or directory
tty-term.c: In function ‘tty_term_find’:
tty-term.c:326: warning: implicit declaration of function ‘setupterm’
Does it have to do anything with the versions of libevent and ncurses?
I have libevent-1.4.14b-stable and ncurses-5.7 and tmux-1.4
If you have root access, I highly suggest using the method presented by knudfl. Otherwise, if you are simply a non-root user (without the ability to gain root access), here are the steps that I used:
mv tmux-1.4.tar.gz tmp
mv ncurses-5.7.tar.gz tmp
mv libevent-2.0.10-stable.tar.gz tmp
tar xvfz tmux-1.4.tar.gz
tar xvfz ncurses-5.7.tar.gz
tar xvfz libevent-2.0.10-stable.tar.gz
CPPFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib" make
/***make install DOESN'T WORK, SO DON'T EVEN TRY, also -static makes it so we don't need to dynamically link shared files in $HOME/local/lib meaning exporting a LD shell variable. We can just copy it and run it. Note: that whole long line above is a single command, run it all together!***/
cp tmux ~/local/bin
/***At this point, you should be able to just type tmux on the command line and have it work. Otherwise, the binary was installed to $HOME/local/bin, and you can run it by changing directories to there.***/
I'd be happy to help or further clarify if the above doesn't work for you. Note that you may need to resolve further dependencies other than the ones I needed to resolve. In that case, you should install all the additional dependencies using the same ./configure --prefix=$HOME/local location.