macos Archives - Justin Silver https://www.justinsilver.com/tag/macos/ Technology, Travel, and Pictures Thu, 10 Nov 2016 22:15:12 +0000 en-US hourly 1 https://wordpress.org/?v=6.0.1 https://www.justinsilver.com/wp-content/uploads/2013/06/cropped-apple-touch-icon-160x160.png macos Archives - Justin Silver https://www.justinsilver.com/tag/macos/ 32 32 Reinstall All Homebrew Packages https://www.justinsilver.com/technology/osx/reinstall-homebrew-packages/?utm_source=rss&utm_medium=rss&utm_campaign=reinstall-homebrew-packages https://www.justinsilver.com/technology/osx/reinstall-homebrew-packages/#respond Thu, 10 Nov 2016 22:15:12 +0000 https://www.justinsilver.com/?p=4326 After upgrading to OS X Sierra I was unable to start MariaDB (or MySQL). Long story short, I ended up rebuilding openssl which fixed the signal 4 error, likely due to changes in the...

The post Reinstall All Homebrew Packages appeared first on Justin Silver.

]]>
AmpedSense.OptimizeAdSpot('AP'); AmpedSense.OptimizeAdSpot('IL'); AmpedSense.OptimizeAdSpot('IR');

After upgrading to OS X Sierra I was unable to start MariaDB (or MySQL). Long story short, I ended up rebuilding openssl which fixed the signal 4 error, likely due to changes in the compiler. I decided that recompiling all the packages would be a good idea to prevent any future issues, and after some digging found this script which I modifying slightly.

#!/bin/bash

# Reinstall all brew packages and dependencies in the correct order 
# - list all installed packages
# - print the package followed by its dependencies
# - print the package and a single depenency on each line
# - perform a topographical sort
# - use tail to reverse the order
# - print out each package in the correct order on a single line
# - pass to brew reinstall
brew list \
  | while read package; do echo -n "$package "; echo $(brew deps $package); done \
  | awk 'NF == 1 {print $1, $1} NF > 1 {for (dep=1; dep<=NF; dep++) print $1, $dep}' \
  | tsort \
  | tail -r \
  | REINSTALL_LIST=$(while read package; do echo -n "$package "; done) \
  | brew reinstall $REINSTALL_LIST

The post Reinstall All Homebrew Packages appeared first on Justin Silver.

]]>
https://www.justinsilver.com/technology/osx/reinstall-homebrew-packages/feed/ 0