Tag Archives: homebrew

MacPorts revisited

I’m setting up my new (old) iMac and I thought I’d give MacPorts another try. I used it since the late 2000s. (I forget why I moved from Fink to MacPorts.) For the last five (?) years or so I’ve used Homebrew, but I’ve always been uneasy about making /usr/local writable, and never convinced by the blandishments on the Homebrew site. I heard about Nix, but before I tried something really different, I thought I’d give MacPorts another look.

So far, so good. I prefer to need sudo to install software. The only real problem I’ve encountered is that the MacPorts version of Pandoc is so old it can’t read docx files. (#sad!) But Pandoc has its own installer, so I’m trying that out too.

iMac configuration

I mentioned previously how I’ve rehabilitated the 10-year old iMac. Today, I’ve been setting up the software environment.

First, I transferred my iTunes library over to the new computer.

Then I installed some non-Safari browsers: Chrome, Firefox, and Brave.

Then I set up Homebrew, and after that, ruby:

$ brew install openssl # various messages because Apple doesn’t like openssl
$ brew install sqlite pcre
$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ rbenv install -l
$ rbenv install 2.4.1 # (as of May 19, 2017)
$ hash -r # rehash your environment

Setting Up Homebrew on my New Old Mac

I set up Homebrew on my iMac. (If you go to their site, the Homebrew project has documentation there, which explains the whole not-use-sudo philosophy and using /usr/local now that Apple makes it hard not to, but I don’t understand it, so it seems like an invitation to having your machine rooted. But I’m a greybeard and I quit understanding internet security back when we used uucp because we didn’t have a real internet. Hopefully someone has thought it through.)

Because I’m too lazy and ignorant (and possibly stupid) to RTFM, I found a set of color-by-number instructions handy, although I didn’t use anything after XCode (a mere 4GB download) and Homebrew.

$ brew doctor
$ brew update
$ brew doctor
$ brew install {lots of good stuff}

At some point I ran into keg-only and Cellar jabber jabber messages, but (see above) I don’t understand any of that. I just take whatever advice brew doctor gives me and move on from there.

Some of the things I always want on a new Mac (or even one that’s 10 years old) include:

$ brew install imagemagick --with-fontconfig
$ brew install colordiff pwgen tree wdiff pstree
$ brew install pngquant
$ brew install jhead antiword poppler
$ brew install sox lame eye-D3
$ brew install gnupg
$ brew install sqlite

More rbenv notes

My last post on rbenv mentioned some things you need to do to get ruby to build on Mountain Lion. Here are a few more things.

This guy Jacob Swanner didn’t want to use either Xcode or gcc. He just used the Xcode command-line tools, with a CC environment variable, thus:

$ CC=/usr/bin/clang rbenv install 1.9.3-p194
$ rbenv global 1.9.3-p194

That won’t work with older versions of Ruby, however, as I mentioned before.

I noted he is also a Homebrew user. I’m not yet ready to go there, although macports gets more and more frustrating with each OS release. (I’m not alone.) (But that’s a subject for some other time.)

And, for convenience, here’s another Homebrewer’s notes on how to get ruby building again with Mountain Lion