Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A simple question, but I have no concrete documentation to confirm my answer. When installing software with the make install command under a unix machine, the default path is going over to /usr/local/bin. I would like to update a package system-wide under /usr/bin. How (and where) do I change the command under make or make install to /usr/bin?

Also - Can the package remain on /usr/local/bin but the systemwide usage of Python (the update being installed) be changed to /usr/local/bin from /usr/bin to avoid modifying the original installed version ?

share|improve this question

migrated from Sep 18 '12 at 15:17

This question came from our site for professional and enthusiast programmers.

Depends on the build system. In a standard GNU autotools: ./configure --prefix=/usr. This is not recommended, as self compiled and installed software belongs in /usr/local, as to not conflict with things provided by the OS. – jordanm Sep 17 '12 at 22:44
When you install via make install, you are not using a package management system, and it is not really appropriate to say that you are installing packages. You are installing unpackaged software. – William Pursell Sep 17 '12 at 22:52
Yes...its unpackaged software.....semantics aside, the default make install defaults to that folder. what is the command to install over /usr/bin instead? Or perhaps, to change the system wide env path to point to /usr/local/bin? To clarify, I'm updating a Python version from 2.4 to 2.7. Thanks – user1678788 Sep 17 '12 at 22:55
@user1678788 - export PATH=/usr/local/bin:$PATH – jordanm Sep 17 '12 at 23:15
It's already in the PATH as /usr/local/bin. Although the first list in the PATH is /usr/bin – user1678788 Sep 17 '12 at 23:31

As far as the install goes, I believe that they’ve handled that pretty well in the comments.

Now for changing the system-wide usage. If it’s available on your OS, update-alternatives is great for this. I am fairly sure that in most cases, the executable in /usr/bin is not an executable but rather a soft link to the true Python executable, so changing which version it points to is simply a matter of changing the symlink to point to the version you want to use by default.

share|improve this answer
Also, it's rather common to have different version of an executable on a system, be it for testing new version or a package requiring a special old version. – ott-- Mar 7 '15 at 21:40

You must log in to answer this question.

protected by JakeGould Oct 9 '15 at 1:45

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?