5

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 ?

  • 2
    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. –  Sep 17 '12 at 22:44
  • 2
    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
  • 1
    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 –  Sep 17 '12 at 22:55
  • 1
    @user1678788 - export PATH=/usr/local/bin:$PATH –  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 –  Sep 17 '12 at 23:31
  • Well, this depends on your distribution. Here e.g. it's /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games -- so don't trust it ;) – frlan Feb 02 '15 at 21:08

1 Answers1

-2

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.

Giacomo1968
  • 55,001
  • 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 07 '15 at 21:40