Setting up MacPorts Prerequisitesīefore installing MacPorts, you need to install Xcode from or the App Store and the Xcode command line tools. I’ve used all three of these systems, but have settled on MacPorts as my preference for a combination of practical and aesthetic reasons. There are problems occasionally, but they are sorted out quickly. It has a huge library of ports that are community maintained and reliable. For example, you can have GUI apps built against the native Quartz window manager whenever possible. MacPorts has a variants system that lets you choose a lot of granular options when installing packages. Like pkgsrc, MacPorts installs into its own sandbox: /opt/local where it can’t hurt anything and can be easily discarded. It also used to install everything by compiling from source and still does compile from source quite a bit, which can be slow. At the time, MacPorts was criticized for wasting time and space by installing its own dependencies rather than linking to the ones from Apple. MacPorts used to be the de facto standard for installing open source packages on OS X for a long time until it was dethroned by Homebrew. MacPorts was hosted by Apple on MacOS Forge but has subsequently moved to GitHub. Darwin is the open source underpinning of macOS and consists of the xnu kernel plus the BSD subsystem. It came out about around the same time as OS X 10.2 Jaguar. MacPorts (neé DarwinPorts) was originally created by engineers working in the Apple UNIX engineering team as part of the OpenDarwin project. Then you can enjoy a very similar configuration and maintenance stack across your server and workstation fleet. Then use pkgsrc to install all of the additional software. For example on RHEL, instead of adding EPEL and IUS you can just not install anything on top of the base system with yum/dnf and only use yum/dnf for updating the base system. If you work in an environment with some combination of RHEL, SmartOS, and macOS then you should consider strongly standardizing on pkgsrc. On the downside, all of the GUI packages for macOS are built for X rather than Quartz and the repository is smaller than Homebrew and MacPorts. If you want to get rid of pkgsrc, just rm -fr /opt/pkg and go on with life. If somehow you borked up pkgsrc, just rm -fr /opt/pkg and install it again. All of the packages are installed into /opt/pkg which means they are safely isolated from your base system. The packages are mostly pre-built binaries and pkgsrc is fast and works well. Packages for Red Hat Enterprise Linux / CentOS, macOS, and SmartOS are maintained by Joyent. It is the standard package manager for NetBSD and SmartOS. I have heard that GitHub uses Homebrew for this. This can be helpful if you set up a new Mac frequently or have a standard config to push out. You can also use it to automate installing apps from the App Store, commercial software, and UNIX utilities. Homebrew is popular so it is probably the lowest friction option despite my criticism. I also find it’s beer metaphors of casks and cellars overly cute. Homebrew will also help you to install things that it doesn’t control and cannot update - which I don’t think it should do. If Homebrew messes up or gets broken then it can be a big mess to clean it up without breaking anything that doesn’t belong to Homebrew. This is a security problem but also it is in conflict with the conceptual purpose of /usr/local/bin being the directory where I install programs myself. My issue is primarily that it works by taking over /usr/local/bin and changing the permission on that directory. Homebrew is currently the most popular of these, but it is “too clever by half”. There are three main package managers for macOS: Alternatively you can download and install things by hand, possibly configuring and compiling them by hand. You need a package manager when you want to install UNIX tools that Apple doesn’t bundle or newer or different versions of tools that they do.Ī package manager helps you to download, possibly compile, install, and update tools in the UNIX environment in macOS. The base system of command line applications available in a default install are also good enough for poking around and getting started with learning the UNIX system. macOS is fully functional out of the box with the software shipped by Apple. JLeave a comment Package managers for macOSĭo I need a package manager? If you never open Terminal.app the answer is definitely, no.
0 Comments
Leave a Reply. |