Ask Your Question

how to change a location of installed program

asked 2014-10-20 06:01:26 -0500

siva gravatar image

updated 2014-10-20 13:32:45 -0500

mether gravatar image


how can i change the location of installed program .

Thank you

edit retag flag offensive close merge delete



Installed with yum or with make install?

skytux gravatar imageskytux ( 2014-10-20 09:42:47 -0500 )edit

add some more details in your question

pnemade gravatar imagepnemade ( 2014-10-20 11:22:06 -0500 )edit

Thank you for replying... I have installed with make install. It is automatically installed in /usr/local/bin . I wanted to change that location. The program I wanted to change isgo-perl-0.15. Thank you

siva gravatar imagesiva ( 2014-10-21 01:35:31 -0500 )edit

Welcome to Ask Fedora! Please take a moment to read the forum guidelines here:

FranciscoD_ gravatar imageFranciscoD_ ( 2014-10-21 17:14:13 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2014-10-21 13:07:27 -0500

sgallagh gravatar image

updated 2014-10-21 14:50:28 -0500

You probably want to carefully select the set of options that you pass to the configure script when building.

Assuming you are using an autotools-based project, you will want to call configure this way:

./configure \
        --build=$(uname -m)-unknown-linux-gnu \
        --host=$(uname -m)-unknown-linux-gnu \
        --program-prefix= \
        --prefix=/usr \
        --exec-prefix=/usr \
        --bindir=/usr/bin \
        --sbindir=/usr/sbin \
        --sysconfdir=/etc \
        --datadir=/usr/share \
        --includedir=/usr/include \
        --libdir=$(rpm --eval %{_libdir}) \
        --libexecdir=/usr/libexec \
        --localstatedir=/var \
        --sharedstatedir=/var/lib \
        --mandir=/usr/share/man \

(This is the way that RPM builds call configure as well; you can see this with 'rpm --eval %configure')

If you're using a cmake-based build, you can try:

/usr/bin/cmake \
        -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
        -DLIB_INSTALL_DIR:PATH=$(rpm --eval %{_libdir}) \
        -DSHARE_INSTALL_PREFIX:PATH=/usr/share \
        -DLIB_SUFFIX=64 \ # Only on 64-bit systems
edit flag offensive delete link more


To add to this - once you've installed software in a certain location using make; make install, you cannot generally move it easily - you need to uninstall it and reinstall it to a new location. Uninstall is sometimes as simple as make uninstall, but can be a lot more complex, depending on how well the autotools project files were written.

To avoid all this, we generate rpms for all the software we use - to make it easy to install/remove. Of course, this requires some work, but when the package is ready, it makes things much simpler.

FranciscoD_ gravatar imageFranciscoD_ ( 2014-10-21 17:13:13 -0500 )edit

answered 2014-10-21 09:13:52 -0500

skytux gravatar image
make install DESTDIR=/path/to/install/dir



edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-10-20 06:01:26 -0500

Seen: 278 times

Last updated: Oct 21 '14