David C.

Authored Comments

In many installations, only users in a "wheel" or "admin" group have sudo access. So you may nee to add yourself to that group first.

Great article. A few additional points that may be of interest to readers.

I still occasionally run across software that isn't bundled as a package and needs to be installed the old fashioned way. Using the default Makefiles usually puts the application in /usr/local/bin or (much worse) /usr/bin. The problem here is that after you've installed many applications, it can become very difficult to identify which files in the maze of directories under /usr/local (or /usr) belong to each application, making it hard to uninstall the application without breaking something.

To fix this, I use what I assume to have been a common practice at some time. I create a /usr/local/package directory and install each application into its own private directory under there. The path to each looks like /usr/local/package/packagename/version. The version term exists so I can have multiple versions installed at once. I usually also create a symlink from /usr/local/package/packagename/latest to the latest version.

With this in place, I create a bunch of symlinks from /usr/local/package/packagename/latest/... to appropriate places under /usr/local (/usr/local/bin, /usr/local/lib, etc.). This accomplishes two things. It allows me to switch versions by changing the "latest" symlink (so I can try new versions and go back if they have problems), and it keeps all of an application's files in one place. So I can uninstall an application (or application revision) by deleting its directory tree and then look for (or use a script to find) the broken symlinks in /usr/local and delete them.

Not as good as package management, since there is no database and no dependency checking, but it is at least somewhat manageable for the relatively few number of packages that need to be manually installed there days.