Install emacs without sudo?
I have been using vim for years, and I don't really like it.
I'd like to try emacs for a while, but it's not installed on any of the linux servers I use regularly. I don't have root so apt-get install
isn't an option (nor can I ask the sysadmin for permission, he would definitely say no).
Is there a binary version of emacs I can install in my home directory? Most of the servers are running CentOS.
Solution 1:
If you can compile code, then just download a source distribution of emacs.
Instead of starting with ./configure
, use the configure options to tell the build system where you want the files to end up. For example:
./configure --prefix=/home/abhi/emacs --bindir=/home/abhi/bin
will install all of emacs' support files under /home/abhi/emacs
, and the emacs executables in /home/abhi/bin
. If the latter is in your $PATH, which it usually is, then things should Just Work(sm).
After that you can
make && make install
without worrying about the installation putting files other than in your home directory.
(This is all based on your home directory being /home/abhi
, of course. Edit as necessary.)
Solution 2:
Installing from source, or manually downloading .rpms and extracting them are possible but hard because they all depend on other libs.
Here is a simple way using conda
conda install -c conda-forge emacs
If you dont have conda and like to install it, see [1]
emacs
has been pre built for OS X and linux_64 platforms, see [2] for versions.
[1] https://conda.io/miniconda.html
[2] https://anaconda.org/conda-forge/emacs
Solution 3:
Don't install emacs onto the servers - there is no reason to force yourself to use the interface through network latency. Instead, install emacs onto your workstation, and let it fetch the files from the servers using its TRAMP mode. Alternatively, you can use Filezilla, it will download the file for you and automatically upload them after you save.