こんばんは
ある日、homebrew
でインストールしたphantomjs
(2.0.0)が動かなかったのです。
$ phantomjs
Killed: 9
対処法
# upx インストール
$ brew install upx
# シンボリックリンクの実体確認
$ readlink `which phantomjs`
/opt/homebrew-cask/Caskroom/phantomjs/2.0.0/phantomjs-2.0.0-macosx/bin/phantomjs
# Unpack実行
$ upx -d /opt/homebrew-cask/Caskroom/phantomjs/2.0.0/phantomjs-2.0.0-macosx/bin/phantomjs
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2013
UPX 3.91 Markus Oberhumer, Laszlo Molnar & John Reiser Sep 30th 2013
File size Ratio Format Name
-------------------- ------ ----------- -----------
40624568 <- 14588338 35.91% Mach/AMD64 phantomjs
Unpacked 1 file.
動作確認
hello.js
"use strict";
console.log('Hello, world!');
phantom.exit();
確認
$ phantomjs -v
2.0.0
$ phantomjs hello.js
Hello, world!
動いた。よかった。
おわりです。