Search code examples
macosmacports

Macports - How to make [program]-[version] binaries alias for [program]


When installing macports programs, it often adds a suffix to the binary for the version number for example cython-27 or gcc-mp-4.9. What if I want cython to alias to cython-27 or gcc to alias to gcc-mp-4.9?

I can go to /opt/local/bin/ and add my own aliases, but is there functionality built into macports to do this systematically.


Solution

  • Run port select --summary to see the various selections that you can make. For your specific requests, you would want to do:

    sudo port select cython cython27
    sudo port select gcc mp-gcc49