I am remote user of super computer having CentOS 6.5 I have to install multiple softwares like gcc automake autoconf libtool bison swig python-dev libpulse-dev (Some of them installed but have version issue). For now I am installing swig using this page.

But When I try to run make install here is the error.

[username@abc swig-3.0.12]$ make install
Installing SWIG executable
Installing /usr/local/bin/swig
cp: cannot create regular file `/usr/local/bin/_inst.21340_': Permission denied
make: *** [install-main] Error 1

One solution is sudo make install but I don't have root user access.

After these I have to install CMU-Sphinx as well. Any help will be appreciated.

2 Answers 2


Virtually all user-space programs may be installed by an unprivileged user in Unix, if the installation is done to a directory that the user has write permissions to.

For software packages that comes with a GNU configure script, for example, this may be done using the --prefix flag with an argument that is a path to a directory in your home directory:

$ ./configure --prefix="$HOME/local/swig"   # other flags go here

See also How to correctly deal with locally built binaries

  • Depending on the package you may need to add export LD_LIBRARY_PATH=/home/yourself/local/package1/lib:/home/yourself/local/package2/lib to your shell configuration. Also, it could make sense to add the executable dirs to your path: export PATH=$PATH:/home/yourself/package42/bin
    – Philippos
    Apr 21, 2017 at 7:42
  • @Kusalananda can you please define its pattern because I have to install other softwares as well.
    – Adnan Ali
    Apr 21, 2017 at 7:45
  • It will change the installation directory ? am I right ? But what to do with software who is searching it in, which will expect it in default directory ?
    – Adnan Ali
    Apr 21, 2017 at 8:01
  • @AdnanAli I'm unsure about what you mean by "pattern". Yes, the downside is that while you can install in your home directory (or wherever you have write permissions), you will not get the executables in any of the default paths. You would have to update your PATH to include $HOME/local/swig/bin (depending on the prefix you're using).
    – Kusalananda
    Apr 21, 2017 at 8:08
  • Read the readme that comes with the software, it will tell you how to use configure. Specifically --prefix. I have just $HOME/local/bin pretended to my path, and use stow to create $HOME/local/ from all of the different programs. Apr 21, 2017 at 8:20

Use configure --help and modify the prefix (that is, the destination location) so that you can install to a location you can write to. Presumably you will want something like /home/$youruser/local or something like that.

You must log in to answer this question.

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